web/flows: don't auto-redirect to first source when passwordless is configured (#7579)

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L 2023-11-15 14:52:48 +01:00 committed by GitHub
parent 5b5fc42a0c
commit 01ffece9ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -75,6 +75,8 @@ export class IdentificationStage extends BaseStage<
// meaning that without the auto-redirect the user would only have the option // meaning that without the auto-redirect the user would only have the option
// to manually click on the source button // to manually click on the source button
if ((this.challenge.userFields || []).length !== 0) return; if ((this.challenge.userFields || []).length !== 0) return;
// we also don't want to auto-redirect if there's a passwordless URL configured
if (this.challenge.passwordlessUrl) return;
const source = this.challenge.sources[0]; const source = this.challenge.sources[0];
this.host.challenge = source.challenge; this.host.challenge = source.challenge;
} }