twenty/packages/twenty-front/src
Charles Bochet c69d665114
Fix reset PasswordToken (#6366)
## Bug Description

We are facing a bug in case recaptcha is enabled.
To reproduce:
- Create your recaptcha: https://www.google.com/recaptcha/about/
- update your server .env with the following variables:

```
CAPTCHA_SECRET_KEY=REPLACE_ME
CAPTCHA_SITE_KEY=REPLACE_ME
CAPTCHA_DRIVER=google-recaptcha
```

- Go to the login page, enter an existing user email and hit 'Reset your
password'.

- Add a console.log in emailPasswordResetLink in auth.resolver.ts to get
the token that would be sent by email if you don't have the mailer setup

- Browse: /reset-password/{passwordToken}

- Update the password:
<img width="1446" alt="image"
src="https://github.com/user-attachments/assets/dd5b077f-293e-451a-8630-22d24ac66c42">

- See that the token is invalid

You should see two calls in your developer network tab. A successful one
to update the password and another to log you in. This 2nd call
(Challenge) does not have the captcha token provided. It should be

## Fix

- Refreshing the token on page load
- providing it to the Challenge graphql call
2024-07-22 17:36:31 +02:00
..
__stories__ 5095 move onboardingstatus computation from frontend to backend (#5954) 2024-06-28 17:32:02 +02:00
config Fix typo in config/index.ts (#5109) 2024-04-23 11:22:31 +02:00
effect-components Fix reset PasswordToken (#6366) 2024-07-22 17:36:31 +02:00
generated 6181 workflows create a custom code executor (#6235) 2024-07-17 17:53:01 +02:00
generated-metadata 6181 workflows create a custom code executor (#6235) 2024-07-17 17:53:01 +02:00
hooks Fix post merge revamp navigation bar (#6297) 2024-07-19 14:24:47 +02:00
loading Update Mobile Navigation bar css for better usage (#6209) 2024-07-11 08:15:49 +02:00
modules Datamodel overview show other fields (#6352) 2024-07-22 16:13:49 +02:00
pages Fix reset PasswordToken (#6366) 2024-07-22 17:36:31 +02:00
testing Fix post merge revamp navigation bar (#6297) 2024-07-19 14:24:47 +02:00
types Relations many in table view (#5842) 2024-06-27 11:28:03 +02:00
utils Fix record show page request errors (#6345) 2024-07-19 18:43:46 +02:00
App.tsx Refactor Calendar Settings into tabs (#6153) 2024-07-08 09:11:47 +02:00
emotion.d.ts fix: fix root start script (#5032) 2024-04-19 18:28:02 +02:00
index.css GH-3546 Recaptcha on login form (#4626) 2024-04-25 23:52:28 +02:00
index.tsx Implement <ScrollRestoration /> (#5086) 2024-05-17 16:36:28 +02:00
nx-react.d.ts chore: setup twenty-ui absolute path alias (#4732) 2024-04-04 15:38:01 +02:00
vite-env.d.ts Migrate to a monorepo structure (#2909) 2023-12-10 18:10:54 +01:00