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(change password):user should be prompted to change their password every x amount of time #59

Merged
merged 1 commit into from
May 23, 2024

Conversation

niyobertin
Copy link
Collaborator

What does this PR do?

Have a functionality for promting user to change their password every x amount of time

Description of Task to be completed?
when x amount of time hits and the user log in they will be requested to change their password, if they denay to do it they won't be allowe do perfom any activity with the system except updating password.

How should this be manually tested?

Clone this repository , cd into it and run:

npm run migrate to run migrations .

  • npm run dev to start server . while server running, use postman and send

1.POST request on locahost:PORT/api/v1/users/login by providing email and password.
it will return jwt as result of successful login.
2. use jwt to authorize you and test other remainig endpoint. if your password is expired you will be requested to change it .

  • npm run test for unit test

What are the relevant pivotal tracker/Trello stories?

#187419196

@niyobertin niyobertin changed the title feat(change password):user should be prompted to chage password feat(change password):user should be prompted to change their password every x amount of time May 17, 2024
@niyobertin niyobertin requested review from teerenzo and soleil00 and removed request for teerenzo May 17, 2024 15:24
@niyobertin niyobertin requested review from Heisjabo, yvanddniyo, dniwemugisha, MugemaneBertin2001 and teerenzo and removed request for soleil00 May 17, 2024 15:25
@niyobertin niyobertin force-pushed the 187419196-prompt-to-change-password branch 4 times, most recently from 6973331 to 4d38a87 Compare May 20, 2024 14:12
@niyobertin niyobertin force-pushed the 187419196-prompt-to-change-password branch 12 times, most recently from 1cfdddb to b2a907c Compare May 22, 2024 13:23
@codecov-commenter
Copy link

codecov-commenter commented May 22, 2024

Codecov Report

Attention: Patch coverage is 89.00000% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 78.34%. Comparing base (c709966) to head (6332f57).

Files Patch % Lines
src/jobs/isPasswordExpired.ts 79.31% 6 Missing ⚠️
src/middlewares/isPasswordOutOfDate.ts 75.00% 3 Missing ⚠️
src/email-templates/passwordExpiredNotification.ts 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev      #59      +/-   ##
==========================================
+ Coverage   78.16%   78.34%   +0.18%     
==========================================
  Files         112      115       +3     
  Lines        1928     1986      +58     
  Branches      272      271       -1     
==========================================
+ Hits         1507     1556      +49     
- Misses        409      430      +21     
+ Partials       12        0      -12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@niyobertin niyobertin force-pushed the 187419196-prompt-to-change-password branch 2 times, most recently from 4df9c5d to b57069a Compare May 22, 2024 14:01
-once password expired in x amount of time user should be promtend to
change password
- when user ignored the notification on and no further operation is
  allowed except updating password.

[Delivers #187419196]
@niyobertin niyobertin force-pushed the 187419196-prompt-to-change-password branch from b57069a to 6332f57 Compare May 23, 2024 08:49
@teerenzo teerenzo merged commit 3d86200 into dev May 23, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants