Skip to content

Commit

Permalink
fix: Requests for new captcha token after a wrong password is entered. (
Browse files Browse the repository at this point in the history
twentyhq#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:
![Screenshot 2024-05-27
191707](https://github.com/twentyhq/twenty/assets/72244570/7530c569-a3b5-46b9-96aa-b03c21f1e99a)

after: user can try again with a new captcha token and login smoothly
without encountering the invalid token error.
  • Loading branch information
piyushyadav1617 committed May 27, 2024
1 parent 9df3b40 commit ef64911
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export const useSignInUp = (form: UseFormReturn<Form>) => {
enqueueSnackBar(err?.message, {
variant: SnackBarVariant.Error,
});
requestFreshCaptchaToken();
}
},
[
Expand All @@ -128,6 +129,7 @@ export const useSignInUp = (form: UseFormReturn<Form>) => {
signUpWithCredentials,
workspaceInviteHash,
enqueueSnackBar,
requestFreshCaptchaToken,
],
);

Expand Down

0 comments on commit ef64911

Please sign in to comment.