Skip to content
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

feat: implement forgot password feature #5534

Merged
merged 14 commits into from
Jul 5, 2024
Merged

Conversation

xielong
Copy link
Contributor

@xielong xielong commented Jun 24, 2024

Description

Implement forgot password feature.

Fixes #5307

Type of Change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update, included: Dify Document
  • Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement
  • Dependency upgrade

How Has This Been Tested?

Here are some feature screenshots:
截屏2024-06-30 21 45 22

截屏2024-06-30 21 47 24

截屏2024-07-01 10 35 22

截屏2024-07-01 11 57 13

截屏2024-07-01 11 58 15

截屏2024-07-01 10 44 28

Suggested Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
  • optional I have made corresponding changes to the documentation
  • optional I have added tests that prove my fix is effective or that my feature works
  • optional New and existing unit tests pass locally with my changes
@xielong
Copy link
Contributor Author

xielong commented Jun 24, 2024

Todo List

Frontend: Add a reset password link on the login page, create a reset password page
Reset Password Emails: Request email, success notification email
Reset Password Logic: Generate token, set expiration time, security checks, update password
Multilingual Support: Add multilingual support, translate all pages and email templates

@xielong xielong changed the title feat: add support for password resetting Jun 26, 2024
@takatost
Copy link
Collaborator

Hey @crazywoola, could you help set up a connection? It'd be great if we can align better by chatting with our product manager and designer.

@xielong xielong marked this pull request as ready for review July 1, 2024 06:32
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. 💪 enhancement New feature or request labels Jul 1, 2024
VincePotato
VincePotato previously approved these changes Jul 2, 2024
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 2, 2024
crazywoola
crazywoola previously approved these changes Jul 3, 2024
Copy link
Member

@crazywoola crazywoola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FE LGTM

Copy link
Collaborator

@takatost takatost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job! 👍 Got a couple of suggestions:

  1. On the login page, if the "Forgot Password" link is sent twice, both reset links can be used. It should only allow the last one to be usable.
  2. If possible, add a rate limit so that password resets can only be requested a certain number of times within an hour to prevent email spam.
@dosubot dosubot bot removed the lgtm This PR has been approved by a maintainer label Jul 3, 2024
@xielong xielong dismissed stale reviews from crazywoola and VincePotato via e95d4e6 July 4, 2024 04:16
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Jul 4, 2024
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 5, 2024
Copy link
Collaborator

@takatost takatost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!!

@takatost takatost merged commit 00b4cc3 into langgenius:main Jul 5, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 enhancement New feature or request lgtm This PR has been approved by a maintainer size:XXL This PR changes 1000+ lines, ignoring generated files.
4 participants