Skip to content

Commit

Permalink
fix: let otp errors propogate to prevent redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
sylv committed Feb 25, 2024
1 parent 126be8d commit e56d700
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion packages/web/src/containers/login-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const LoginForm: FC = () => {

if (user.otpRequired && loginInfo) {
return (
<div>
<div className="w-full">
<OtpInput
loading={loggingIn}
invalid={invalidOTP}
Expand Down
1 change: 0 additions & 1 deletion packages/web/src/hooks/useUser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export const useLoginUser = () => {
} else if (result.error) {
if (result.error.message.toLowerCase().includes('otp')) {
setOtp(true);
return;
}

throw result.error;
Expand Down

0 comments on commit e56d700

Please sign in to comment.