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

feat(ui): filter invalid sign-in method (#2389)

This commit is contained in:
simeng-li 2022-11-11 10:46:23 +08:00 committed by GitHub
parent ebb34ff923
commit fe9b592ec2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,7 +9,11 @@ export const useSieMethods = () => {
return { return {
signUpMethods: methods ?? [], signUpMethods: methods ?? [],
signUpSettings: { password, verify }, signUpSettings: { password, verify },
signInMethods: experienceSettings?.signIn.methods ?? [], signInMethods:
experienceSettings?.signIn.methods.filter(
// Filter out empty settings
({ password, verificationCode }) => password || verificationCode
) ?? [],
socialConnectors: experienceSettings?.socialConnectors ?? [], socialConnectors: experienceSettings?.socialConnectors ?? [],
signInMode: experienceSettings?.signInMode, signInMode: experienceSettings?.signInMode,
forgotPassword: experienceSettings?.forgotPassword, forgotPassword: experienceSettings?.forgotPassword,