mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 02:02:23 +00:00
prompt to setup passwordless before mfa
This commit is contained in:
@@ -180,21 +180,6 @@ export default function PasswordForm({
|
||||
}
|
||||
|
||||
return router.push(`/mfa?` + params);
|
||||
} else if (loginSettings?.forceMfa && !availableSecondFactors.length) {
|
||||
const params = new URLSearchParams({
|
||||
loginName: resp.factors.user.loginName,
|
||||
checkAfter: "true", // this defines if the check is directly made after the setup
|
||||
});
|
||||
|
||||
if (authRequestId) {
|
||||
params.append("authRequestId", authRequestId);
|
||||
}
|
||||
|
||||
if (organization) {
|
||||
params.append("organization", organization);
|
||||
}
|
||||
|
||||
return router.push(`/mfa/set?` + params);
|
||||
} else if (
|
||||
resp.factors &&
|
||||
!resp.factors.passwordless && // if session was not verified with a passkey
|
||||
@@ -215,6 +200,21 @@ export default function PasswordForm({
|
||||
}
|
||||
|
||||
return router.push(`/passkey/add?` + params);
|
||||
} else if (loginSettings?.forceMfa && !availableSecondFactors.length) {
|
||||
const params = new URLSearchParams({
|
||||
loginName: resp.factors.user.loginName,
|
||||
checkAfter: "true", // this defines if the check is directly made after the setup
|
||||
});
|
||||
|
||||
if (authRequestId) {
|
||||
params.append("authRequestId", authRequestId);
|
||||
}
|
||||
|
||||
if (organization) {
|
||||
params.append("organization", organization);
|
||||
}
|
||||
|
||||
return router.push(`/mfa/set?` + params);
|
||||
} else if (authRequestId && resp.sessionId) {
|
||||
const params = new URLSearchParams({
|
||||
sessionId: resp.sessionId,
|
||||
|
||||
Reference in New Issue
Block a user