Skip to content

Commit 1418ff7

Browse files
piyushyadav1617Weiko
authored andcommitted
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: ![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.
1 parent 624cd76 commit 1418ff7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/twenty-front/src/modules/auth/sign-in-up/hooks/useSignInUp.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ export const useSignInUp = (form: UseFormReturn<Form>) => {
118118
enqueueSnackBar(err?.message, {
119119
variant: SnackBarVariant.Error,
120120
});
121+
requestFreshCaptchaToken();
121122
}
122123
},
123124
[
@@ -128,6 +129,7 @@ export const useSignInUp = (form: UseFormReturn<Form>) => {
128129
signUpWithCredentials,
129130
workspaceInviteHash,
130131
enqueueSnackBar,
132+
requestFreshCaptchaToken,
131133
],
132134
);
133135

0 commit comments

Comments
 (0)