Account Recovery
In this walkthrough, John has forgotten his Wayfinder password. He selects Forgot password? on the sign-in screen, receives a recovery email, opens the link, and sets a new password. ThunderID runs the recovery flow end-to-end and returns him to Wayfinder ready to sign in with the new credentials.
Complete Set Up Your Environment before starting this walkthrough.
Understand It covers the requirements story behind this use case.
Set Up Account Recovery
Recovery emails go through Wayfinder Mock SMTP, an email provider that the Wayfinder bundle imports for you. It points at the sample's local SMTP server on 127.0.0.1:2525, and the bundled recovery flow already selects it, so you do not need to configure email. To read the emails the local server captures, open http://localhost:8788.
To send through a real mail server instead, update that provider through the /connections/email-smtp API, as described in Configure an Email Provider.
Pick Your Pattern
In the redirect-based pattern, the consumer app sends the user to ThunderID for the entire recovery experience. The Wayfinder web frontend is configured exactly this way: the Sign in button triggers an OIDC redirect to
ThunderID. From there, the user picks Forgot password?, completes the recovery flow, and returns to Wayfinder to sign in with the new password.
Try the Use Case
- Open http://localhost:5173 and select Sign in. The browser navigates to ThunderID.
- On the ThunderID sign-in page, select Forgot password?.
- Enter
john.doeas the username and submit. ThunderID runs the recovery flow and sends a recovery email tojohn.doe@example.com. - Open the email in John's inbox and open the link inside.
- ThunderID renders a Set new password screen. Enter a new password and submit.
- ThunderID shows a confirmation and returns John to Wayfinder. Select Sign in again and sign in with the new password.
Going Deeper
- Want to understand the steps the recovery flow takes? See Flows in the Build It tutorial. Concepts.
- Prefer to build the recovery flow manually? See Build the Flows in the Build It tutorial.
- Want to change the wording or branding of the recovery email? See Customize Notifications in the Build It tutorial.