Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add a /reset-password route and component

See original GitHub issue


We need a UI to perform a password reset action


  • [ ] Add /reset-password/:token route
  • Add components/password/reset-password
  • Component should have a form two password fields, for password and password confirmation
  • On submitting the form, an action should trigger
  • [ ] Route should handle action by sending an API POST /reset-password request with the following data:
  value: token // from query param,
  • on success, route should log user in with new credentials and show a flash with a success message
  • [ ] on a 422 failure, it should indicate that the passwords do not match


We can use mirage to do this until is done. Otherwise, it’s partially blocked by that set of API issues.

I would not consider it blocked by #5, though, since there is nothing preventing us from displaying an unstyled form for now. The UI won’t be hooked up with the rest of the app immediately.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

begedincommented, Apr 11, 2017

During password reset, you have access to the email and the typed in password (and confirmation). At that point, it should be a matter of calling session to authenticate.

You can see how it’s done in the login form and do something similar:

authenticate() {
  set(this, 'isLoading', true);

  let credentials = this.getProperties('identification', 'password');

  get(this, 'session').authenticate('authenticator:jwt', credentials).catch((reason) => {
    set(this, 'isLoading', false);
    set(this, 'errors', reason.error || reason);

You can ignore the isLoading part for now, as well as error handling. Just get the email and the password the user typed in and call

get(this, 'session').authenticate('authenticator:jwt', { identification: email, password });

once the reset task is successfully completed.

joshsmithcommented, Mar 7, 2017

Thinking we may want to call this /password/reset

Read more comments on GitHub >

github_iconTop Results From Across the Web

Implementing A Reset Password Feature With Next.js ...
In this article, we'll discuss how to implement a password-reset feature with Next.js dynamic routes while prioritizing the UX.
Read more >
How to make a reset password form route with next.js
How to make a reset password form route with next.js ; 'react'; import ; '../components/ResetPasswordPage'; import ; Router, Switch ; 'react-router- ...
Read more >
Adding a forgot password page - React.js Tutorial - LinkedIn
The first step in implementing a reset-password flow is adding a button that ... is go to our routes component and add a...
Read more >
Route [password.reset] not defined. - Laracasts
Route [password.reset] not defined. I'm having a trouble with the reset password. I have these routes: Copy Code Route::get('password/reset/{token}', ...
Read more >
Create a REST API [Part 7]: Forgot / Reset Password Routes
In this tutorial, you will create API routes that will allow users to reset a lost password in your PostgreSQL database using KnexJS...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found