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

fix(experience): should not show error message on sign-in page (#5052)

should not show error message on sign-in page
This commit is contained in:
simeng-li 2023-12-04 14:43:59 +08:00 committed by GitHub
parent aa5bfdd0b3
commit ff730acf1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,7 +46,15 @@ const useCheckSingleSignOn = () => {
const [error, result] = await request(email);
if (error) {
await handleError(error);
// Show error message only if the user is trying to continue the single sign-on flow, otherwise, silently fail
if (continueSignIn) {
await handleError(error, {
'guard.invalid_input': () => {
setErrorMessage(t('error.invalid_email'));
},
});
}
return;
}