0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

refactor(console): enabled verification code checkbox when sign-up identifier set to none (#2360)

This commit is contained in:
Xiao Yijun 2022-11-09 15:52:29 +08:00 committed by GitHub
parent d015aa934c
commit ac97fb75b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -134,9 +134,7 @@ const SignInMethodEditBox = ({
signInMethod.identifier !== SignInIdentifier.Username && !isSignUpPasswordRequired
}
isVerificationCodeCheckable={
(isSignUpPasswordRequired && isSignUpVerificationRequired) ||
// Note: the next line is used to handle the case when the sign-up identifier is `Username`
(isSignUpPasswordRequired && signInMethod.identifier !== SignInIdentifier.Username)
!(isSignUpVerificationRequired && !isSignUpPasswordRequired)
}
isDeletable={!requiredSignInIdentifiers.includes(signInMethod.identifier)}
onVerificationStateChange={(identifier, verification, checked) => {