mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-11 20:52:43 +00:00
remove type check
This commit is contained in:
@@ -116,7 +116,7 @@ If the user has set up an additional **single** second factor, it is redirected
|
||||
|
||||
**NO MFA, FORCE MFA:** If no MFA method is available, and the settings force MFA, the user is sent to `/mfa/set` which prompts to setup a second factor.
|
||||
|
||||
**PROMPT PASSKEY** If the settings do not enforce MFA, we check if passkeys are allowed with `loginSettings?.passkeysType === PasskeysType.ALLOWED` and redirect the user to `/passkey/set` if no passkeys are setup. This step can be skipped.
|
||||
**PROMPT PASSKEY** If the settings do not enforce MFA, we check if passkeys are allowed with `loginSettings?.passkeysType == PasskeysType.ALLOWED` and redirect the user to `/passkey/set` if no passkeys are setup. This step can be skipped.
|
||||
|
||||
If none of the previous conditions apply, we continue to sign in.
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ export default async function Page({
|
||||
organization={organization} // stick to "organization" as we still want to do user discovery based on the searchParams not the default organization, later the organization is determined by the found user
|
||||
loginSettings={loginSettings}
|
||||
promptPasswordless={
|
||||
loginSettings?.passkeysType === PasskeysType.ALLOWED
|
||||
loginSettings?.passkeysType == PasskeysType.ALLOWED
|
||||
}
|
||||
isAlternative={alt === "true"}
|
||||
/>
|
||||
|
||||
@@ -25,7 +25,7 @@ export function ChooseAuthenticatorToSetup({
|
||||
} else {
|
||||
return (
|
||||
<>
|
||||
{loginSettings.passkeysType === PasskeysType.NOT_ALLOWED &&
|
||||
{loginSettings.passkeysType == PasskeysType.NOT_ALLOWED &&
|
||||
!loginSettings.allowUsernamePassword && (
|
||||
<Alert type={AlertType.ALERT}>{t("noMethodsAvailable")}</Alert>
|
||||
)}
|
||||
@@ -35,7 +35,7 @@ export function ChooseAuthenticatorToSetup({
|
||||
loginSettings.allowUsernamePassword &&
|
||||
PASSWORD(false, "/password/set?" + params)}
|
||||
{!authMethods.includes(AuthenticationMethodType.PASSKEY) &&
|
||||
loginSettings.passkeysType === PasskeysType.ALLOWED &&
|
||||
loginSettings.passkeysType == PasskeysType.ALLOWED &&
|
||||
PASSKEYS(false, "/passkey/set?" + params)}
|
||||
</div>
|
||||
</>
|
||||
|
||||
@@ -165,7 +165,7 @@ export function RegisterForm({
|
||||
{/* show chooser if both methods are allowed */}
|
||||
{loginSettings &&
|
||||
loginSettings.allowUsernamePassword &&
|
||||
loginSettings.passkeysType === PasskeysType.ALLOWED && (
|
||||
loginSettings.passkeysType == PasskeysType.ALLOWED && (
|
||||
<div className="pb-4">
|
||||
<AuthenticationMethodRadio
|
||||
selected={selected}
|
||||
@@ -188,7 +188,7 @@ export function RegisterForm({
|
||||
onClick={handleSubmit((values) => {
|
||||
const usePasswordToContinue: boolean =
|
||||
loginSettings?.allowUsernamePassword &&
|
||||
loginSettings?.passkeysType === PasskeysType.ALLOWED
|
||||
loginSettings?.passkeysType == PasskeysType.ALLOWED
|
||||
? !!!(selected === methods[0]) // choose selection if both available
|
||||
: !!loginSettings?.allowUsernamePassword; // if password is chosen
|
||||
// set password as default if only password is allowed
|
||||
|
||||
Reference in New Issue
Block a user