Hereโs the final session of the series.
Today, youโll learn how to create APIs that let a user change and reset their password โ this is arguably one of the most important functionalities for user management.
Thereโs nothing much to say here other than this is an important lesson ๐.
I was in a pretty bad state when recording this workshop โ so youโll see me make a ton of typos (and end up having to debug them on the spot) in this session.
If you want to learn to debug when things go wrong then watch the debugging sections. Otherwise, just skip ahead according to the timestamps below.
Source Code
Hereโs a link to the Github Repository.
Timestamps
- 0:00 Introduction
- 03:00 Recap of the previous session
- 04:00 Creating a password reset feature
- 08:00 Creating a reset password endpoint
- 11:00 Writing tests for the reset passward feature
- 18:30 Writing better functions
- 21:10 Using Porimse chains instead of try/catch
- 24:30 Decoding the password token
- 30:00 Thinking about the user flow
- 34:00 Creating a change password service function
- 42:40 Debugging the change password test
- 49:50 Debugging end
- 50:30 Testing the change password happy path
- 59:30 What reset password endpoint should contain
- 1:02:20 Changing the endpoints (and more debugging :Sweat:)
- 1:09:20 Fixing tests caused by a mutation
- 1:11:14 Back to the reset password feature (build it out)
- 1:12:40 Writing a API test for the reset password flow (and more debugging)
- 1:18:36 Debugging end
- 1:18:37 Getting a password reset token in the test file
- 1:28:58 Debugging end
- 1:32:20 Sending a change password request
- 1:36:30 Fixing the change password function
- 1:37:20 Logging in with the new password
- 1:39:50 Wrapping up and recap
- 1:42:15 Verifying the password reset token
Welcome! Unfortunately, you donโt have access to this lesson. To get access, please purchase the workshop or enroll in Magical Dev School.
Unlock this lesson