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

878 forgot password feature #1914

Merged
merged 10 commits into from
Jul 23, 2024
Merged

878 forgot password feature #1914

merged 10 commits into from
Jul 23, 2024

Conversation

MartinJurcoGlina
Copy link
Collaborator

@MartinJurcoGlina MartinJurcoGlina commented Jul 11, 2024

Checklist

  • I have followed (at least) the PR section of the contributing guide.
  • I fixed all necessary PR warnings
  • The commit history is clean
  • The E2E tests are passing
  • If possible, the issue has been divided into more subtasks
  • I did a self review before requesting a review from another team member

Description

  • added forgot password link to login screen
  • added sending email with reset password link
  • added password reset screen

How to test

  1. run app locally in --full mode with email service and either set up smtp user that would sent email to your address, or just run mailslurper to catch emails
  2. login with any user, set email address and log out
  3. On login screen click Forgot password link
  4. put in the email address that you set for the user
  5. if it is correct address you should receive an email with reset password link either to your inbox or in mailslurper
  6. Open the received link and set new password, auth token is currently set to expire after 15 minutes
  7. try logging in with new password
  8. try disabling your user and try going to forgot password again
  9. email for disabled user shouldn't be sent

Closes #878

Copy link

github-actions bot commented Jul 11, 2024

Warnings
⚠️ No CHANGELOG added.
⚠️ There were changes in the frontend, but no E2E-test was added or modified!

Generated by 🚫 dangerJS against f525d70

@SamuelPull SamuelPull self-requested a review July 17, 2024 07:10
@openkfwCI
Copy link

openkfwCI commented Jul 19, 2024

NotesTime
Note for Reviewer: E2E tests on pipeline 59985 on remote server succeededTue, 23 Jul 2024 08:53:13 +0000

Generated by E2E-Test

@@ -273,6 +273,21 @@ export const getLoginErrorFromResponse = (status, data) => {
}
};

export const validatePassword = (newPassword) => {
Copy link
Collaborator

@SamuelPull SamuelPull Jul 19, 2024

Choose a reason for hiding this comment

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

Please look at the regex for password
/^(?=.*[A-Za-zÀ-ÿ].*)(?=.*[0-9].*)([A-Za-zÀ-ÿ0-9-_!?@#$&*,.:/()[\] ])*$/

Production environment requires a more complex password, so there might be a mismatch between frontend and backend validation.

@SamuelPull SamuelPull merged commit 11e3b63 into main Jul 23, 2024
30 checks passed
@SamuelPull SamuelPull deleted the 878-forgot-password-feature branch July 23, 2024 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding a link "forgot your password?" on the login screen
3 participants