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

[#164046248] Users can reset their password #24

Merged
merged 1 commit into from
Mar 18, 2019

Conversation

RachelleMaina
Copy link

@RachelleMaina RachelleMaina commented Mar 13, 2019

Description

Adds password reset functionality which is valuable in instances where users forget their login credentials.

Type of change

  • Non-breaking change (Users can reset their passwords).

How Has This Been Tested

  • Integration test
  • End to end

Checklist

  • Feature passes team's flake8 standards
  • New and existing unit tests pass locally with my changes

How can this be manually tested?

The two endpoints require a registered user. A user supplies their registered email address and a callback URL which is the domain of the application. A link containing the token is sent to the supplied email address. On clicking the link, a user is redirected to the page contained in the call back URL where they will reset their password. Here they supply a password and a confirm password. This is then updated.
POST /api/users/password-reset/

Example request body:

{
            "payload": {
                "email": "jake@jake.com",
                "callback_url": "https://legion.com"
            }
        }

PUT /api/users/password-reset/

Example request body:

{
  "user_password":{
    "password": "jake123son",
    "confirm_password": "jake123son",
   "token": "valid-token"
  }
}

PT

#164046248

@abulojoshua1
Copy link
Contributor

abulojoshua1 commented Mar 14, 2019

@RachelleMaina, please fix the failing build.

@BrianSerem BrianSerem temporarily deployed to ah-legion-staging-pr-24 March 14, 2019 17:17 Inactive
@RachelleMaina RachelleMaina temporarily deployed to ah-legion-staging-pr-24 March 14, 2019 17:57 Inactive
@RachelleMaina RachelleMaina temporarily deployed to ah-legion-staging-pr-24 March 14, 2019 18:20 Inactive
@RachelleMaina RachelleMaina temporarily deployed to ah-legion-staging-pr-24 March 14, 2019 18:23 Inactive
@RachelleMaina RachelleMaina temporarily deployed to ah-legion-staging-pr-24 March 14, 2019 18:28 Inactive
@RachelleMaina RachelleMaina temporarily deployed to ah-legion-staging-pr-24 March 14, 2019 19:42 Inactive
@RachelleMaina RachelleMaina temporarily deployed to ah-legion-staging-pr-24 March 14, 2019 19:50 Inactive
@RachelleMaina RachelleMaina temporarily deployed to ah-legion-staging-pr-24 March 15, 2019 04:25 Inactive
@RachelleMaina RachelleMaina temporarily deployed to ah-legion-staging-pr-24 March 15, 2019 04:40 Inactive
@RachelleMaina
Copy link
Author

@abulojoshua1 The build is failing because there is a test that is failing on travis. The test is running locally, so am at a loss. I am continually trying to find a solution for this.

@RachelleMaina RachelleMaina temporarily deployed to ah-legion-staging-pr-24 March 15, 2019 06:45 Inactive
@RachelleMaina RachelleMaina temporarily deployed to ah-legion-staging-pr-24 March 15, 2019 07:04 Inactive
@RachelleMaina RachelleMaina temporarily deployed to ah-legion-staging-pr-24 March 15, 2019 07:56 Inactive
@RachelleMaina
Copy link
Author

@abulojoshua1 The build is now passing.

@Etomovich Etomovich requested a review from MandelaK March 15, 2019 09:04
@RachelleMaina RachelleMaina requested review from MandelaK, ElMonstro, abulojoshua1, cob04 and Etomovich and removed request for ElMonstro and MandelaK March 15, 2019 09:04
Copy link
Contributor

@ElMonstro ElMonstro left a comment

Choose a reason for hiding this comment

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

Approved

authors/apps/authentication/utils.py Outdated Show resolved Hide resolved
@MandelaK
Copy link
Contributor

Could you please list any non-breaking changes you included in this PR?

@RachelleMaina
Copy link
Author

Could you please list any non-breaking changes you included in this PR?

Will do

@BrianSerem BrianSerem temporarily deployed to ah-legion-staging-pr-24 March 16, 2019 10:12 Inactive
@RachelleMaina RachelleMaina temporarily deployed to ah-legion-staging-pr-24 March 16, 2019 22:39 Inactive
@RachelleMaina RachelleMaina temporarily deployed to ah-legion-staging-pr-24 March 16, 2019 22:46 Inactive
Copy link
Contributor

@cob04 cob04 left a comment

Choose a reason for hiding this comment

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

works great

authors/apps/authentication/views.py Outdated Show resolved Hide resolved
@RachelleMaina RachelleMaina temporarily deployed to ah-legion-staging-pr-24 March 18, 2019 08:14 Inactive
@RachelleMaina RachelleMaina temporarily deployed to ah-legion-staging-pr-24 March 18, 2019 08:32 Inactive
 - add user supply their email address functionality
 - add user can receive a password reset link on their email
 - add user can change their password
 - add user cannot use a password reset token twice
 - add tests
 - update README.md

[Finishes #164046248]
Copy link
Contributor

@abulojoshua1 abulojoshua1 left a comment

Choose a reason for hiding this comment

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

LGTM

@abulojoshua1 abulojoshua1 merged commit 44e0964 into develop Mar 18, 2019
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.

7 participants