fix: let otp errors propogate to prevent redirects

This commit is contained in:
Sylver 2024-02-26 03:39:22 +08:00
parent 126be8d8c6
commit e56d700d2e
2 changed files with 1 additions and 2 deletions

View File

@ -56,7 +56,7 @@ export const LoginForm: FC = () => {
if (user.otpRequired && loginInfo) { if (user.otpRequired && loginInfo) {
return ( return (
<div> <div className="w-full">
<OtpInput <OtpInput
loading={loggingIn} loading={loggingIn}
invalid={invalidOTP} invalid={invalidOTP}

View File

@ -48,7 +48,6 @@ export const useLoginUser = () => {
} else if (result.error) { } else if (result.error) {
if (result.error.message.toLowerCase().includes('otp')) { if (result.error.message.toLowerCase().includes('otp')) {
setOtp(true); setOtp(true);
return;
} }
throw result.error; throw result.error;