From the course: React: Authentication

Adding a "forgot password" page - React.js Tutorial

From the course: React: Authentication

Adding a "forgot password" page

- [Speaker] Alright, so now that we know the basic password reset process and how that's going to all fit together, let's get started here. And I've taken the liberty of providing you here with this forgot password page. It's a pretty straightforward page. There wasn't really anything new here, which is why I just created it and gave it to you, right? It just contains a single email address input that the user can enter their email address into. And when they click that, right when they click the button after entering their email address, that's going to send a request to this endpoint on the server that we're going to have to create ourselves. All right? And once that happens, it's going to display a little success message and it will automatically navigate the user back to the login page, which they'll be needing to use once they reset their password. So that's pretty much all we need to do there. I added another route for this already. So all that's left for you to do is check out the starting state for the code here and make sure it works for you. So what you should be able to do here, running the version of the app that's found in the exercise files for this video is you should be able to finally click on this, forgot your password link, and that'll take you to this little page, which is the component that I just showed you. And you can enter in your email here and then click send reset link. And as I said, that will send a request to our server, which is where we're going to go next.

Contents