[BB-2290] Add password recovery
Created by: Agrendalath
This adds django-rest-passwordreset, which provides API for resetting password and adds the password recovery workflow to the new Ocim frontend.
Testing instructions:
- Checkout this branch.
- Run Ocim (inside vagrant with
make run.dev
). - Go to
frontend/
and build the new API client with./scripts/build-api-client.sh
- Run the new frontend:
npm start
. - Create a new account in console.
- Go to the
Login
page and click onI forgot my password
. - Test the following:
- non-email value,
- non-existing value,
- existing value.
- The last one from the previous point will output an email in the terminal that runs Ocim. Optionally you can copy the whole email and create HTML file from it to check that it looks correctly.
- Copy the reset link from an email and paste into the browser. Try the following things on the password reset page:
- non-matching passwords,
- non-correct passwords,
- correct passwords.
- After changing the password, you should be redirected to the login page with an appropriate
success
alert. - Use the copied link again and see that it's not valid anymore.
Reviewers: