-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-3245 Change password from settings page #3538
Conversation
…t column on user entity
|
@i-am-chitti merging main in your branch should fix the |
packages/twenty-server/src/core/auth/emails/password-reset-link.email.tsx
Outdated
Show resolved
Hide resolved
packages/twenty-server/src/core/auth/emails/password-reset-link.email.tsx
Outdated
Show resolved
Hide resolved
packages/twenty-server/src/core/auth/emails/password-reset-link.email.tsx
Outdated
Show resolved
Hide resolved
packages/twenty-server/src/core/auth/emails/password-update-notify.email.tsx
Outdated
Show resolved
Hide resolved
Thanks @martmull for the review. I'll be pushing the updates soon. |
@martmull, I've made the changes. You can have a re-review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @i-am-chitti, that's really good work. I have some minor changes regarding email css and code style. I don't want to be too touchy on that so don't hesitate to ask me to pass those changes! Also, I will ask @lucasbordeau to double check the front part. Then we will be able to merge 🎉. Really nice job again!
packages/twenty-emails/src/emails/password-reset-link.email.tsx
Outdated
Show resolved
Hide resolved
packages/twenty-emails/src/emails/password-reset-link.email.tsx
Outdated
Show resolved
Hide resolved
packages/twenty-emails/src/emails/password-update-notify.email.tsx
Outdated
Show resolved
Hide resolved
packages/twenty-emails/src/emails/password-reset-link.email.tsx
Outdated
Show resolved
Hide resolved
packages/twenty-emails/src/emails/password-reset-link.email.tsx
Outdated
Show resolved
Hide resolved
Nice work ! |
@i-am-chitti , this diff will fix your tests also |
@martmull Thanks for the diff and helping hand. Indeed, feel free to push the changes in PR itself. I've pushed the diff, but seems there are further tests failing related to emails. Could you have a look once and direct me how to get them fixed? |
@i-am-chitti thank you for your changes. I have added one last commit to fix the CI (it was an issue with twenty-emails package, not your fault). Think we are able to merge now 🚀. Thank you very much for your contrib, it is really good job. Cheers 🤗 |
Great work @i-am-chitti !!! Thanks! |
Description
This PR adds password reset feature to change password from settings page. Here is the workflow -
emailPasswordResetLink
mutation. It generates the token and store its hash in DB with an expiry. It sends back the confirmation to user.PASSWORD_RESET_TOKEN_EXPIRES_IN
, it will throw error. Also, this constant is optional. Its default is 5 minutes.reset-password/:token
path. Here a validation of token is carried out throughvalidatePasswordResetToken
query. If invalid, in case of non-logged in, redirected to sign in page else to index page.updatePasswordViaResetToken
. It validates the token again and then, new password. New password should be same as old. On success, it updates the password and sends the success confirmation.Have a look at the attached Gdrive link where complete flow has been recorded.
Issue
Note
skipValidation
incodegen.cjs
. This error is not related to mine changes. It started popping once I synced the main branch. Request you to kindly regenerate the graphql files before merging.Screenshots
Screencast
https://drive.google.com/file/d/1y6q6ocakQa6sScMuPZQYdDeXGuuNyFyQ/view?usp=sharing