Skip to content

Forgot Password

Vedant Wakalkar requested to merge phoenix/feature/authentication into phoenix/develop

Fixes

Fixes for #211 (closed) no by @Karna98 (Partially)
(Email configuration will be pushed in another PR)

Description

Forgot Password functionality is implemented.

Type of PR
This PR is a feature.

Technicalities

Tests

  1. Visit http://localhost:2354/users/index -> Forgot Password
  2. (http://localhost:2354/forgot/password) User has to enter an email.
  3. On Submit, A link will be flashed as shown below.

image

  1. Copy the URL and open in a new tab.
  2. Setting up new password contains 2 steps :
    a. Verifying 2FA
    b. Setting a new password
  3. On successful verification of 2FA, the user will be allowed to set a new password.
    After verification, if the user visits any other page, then to set up a new password using the same link, he will have to reverify 2FA.
  4. Reset Link is valid for 15 min and Reset link can be regenerated after 5 min.

The regeneration is valid if the previous reset link was not used to set a new password. On successful updation, the reset token is deleted from the table.

Note: Go to http://localhost:2355/.
In the users table, add

  1. token_pass [varchar(30), default=null]
  2. generated_at [varchar(30), default=null].

Checklist:

  • My pull request has a descriptive title (not a vague title like "Update index.md").
  • My pull request targets the phoenix/develop branch of the repository.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.

Merge request reports