fix: reset password errors now work again#6263
Conversation
✅ Deploy Preview for partners-bloom-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for bloom-angelopolis ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for partners-bloom-msq2 canceled.
|
✅ Deploy Preview for bloom-public-seeds ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for bloom-exygy-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
emilyjablonski
left a comment
There was a problem hiding this comment.
Would love to see some tests addded here
|
Hey @emilyjablonski we actually have had test suites for this (reset-password.test.tsx on the public side as a unit test for example) when we re-wrote the auth service for the prisma rework we changed how the errors were thrown and that change meant that the UI was no longer getting the kinds of errors it was expecting or do you mean an e2e test suite on this? that might be tough with how the token is a generated jwt |
|
The last commit you made covers em! |
emilyjablonski
left a comment
There was a problem hiding this comment.
Given we can already know the token is missing, we should not require the user to enter in both passwords just to see the error, and then not be given direction about what to do next. Not all users are going to know what "Token not found. Please request for a new one." means. We should do what we do in other cases, which is to show the request modal and redirect. I worry as-is this is going to cause more confusion.
This PR addresses #6258
Description
Our error messaging for forgot password flows meant that the UI never pointed users to trying re-requests for password reset tokens that have been used or expired
This pr updates our error logging to fix that
How Can This Be Tested/Reviewed?
Create a public account -> go through the forgot password flow -> you should be able to successfully reset your password -> use the same link in the email you received to try and reset your password again -> you should get an error telling you to re-request a forgot password
Create a public account -> request a reset password email -> do not open it until the token expires (1 hr after getting the email) -> try and reset password with that email -> you should get an error telling you to re-request a forgot password
^ repeat these steps as a partner user
Author Checklist:
yarn generate:clientand/or created a migration when requiredReview Process: