Skip to content

Commit

Permalink
fix: otp double signin bug
Browse files Browse the repository at this point in the history
  • Loading branch information
markwylde committed Jan 31, 2025
1 parent 938266f commit a4a4790
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,16 @@ const TotpCodeVerification = ({ flow }: Props) => {

const handleSubmit = useCallback(
async (code: string[]) => {
if (isSubmitting) {
return;
}

setInputErrorMessage(undefined);
setIsSubmitting(true);
await onSubmit(code.join(''));
setIsSubmitting(false);
},
[onSubmit]
[onSubmit, isSubmitting]
);

return (
Expand Down

0 comments on commit a4a4790

Please sign in to comment.