fix: Requests for new captcha token after a wrong password is entered. (#5614)
Fix issue where captcha did not reset after an incorrect password was entered and invalid token error was thrown, ensuring users receive a new captcha token on each attempt. before:  after: user can try again with a new captcha token and login smoothly without encountering the invalid token error.
This commit is contained in:
@ -118,6 +118,7 @@ export const useSignInUp = (form: UseFormReturn<Form>) => {
|
||||
enqueueSnackBar(err?.message, {
|
||||
variant: SnackBarVariant.Error,
|
||||
});
|
||||
requestFreshCaptchaToken();
|
||||
}
|
||||
},
|
||||
[
|
||||
@ -128,6 +129,7 @@ export const useSignInUp = (form: UseFormReturn<Form>) => {
|
||||
signUpWithCredentials,
|
||||
workspaceInviteHash,
|
||||
enqueueSnackBar,
|
||||
requestFreshCaptchaToken,
|
||||
],
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user