Password reset
A user who forgot their password enters their email and gets a reset link that is valid for 30 minutes. A valid link opens Set new password, and saving it updates the password; a link opened later ends the journey as Link expired. Reset by SMS code is planned and drawn as such.
What UJN shows here Point at a note to see its part of the drawing
The source (31 lines)
password-reset.puml
@startujnrender { legend }journey RESET "Password reset"description: "Reset by email link; reset by SMS is planned"unique_id_friendly: reset start beginview forgot { title: "Forgot password"; description: "Enter your email"; route: /forgot }action send_link { type: message; title: "Send reset link"; channel: email }handoff email_link { title: "Reset link"; description: "The user opens their inbox"; channel: email; timeout: 30 min; resume: /reset/:token }view set_password{ title: "Set new password" route: /reset/:token trace: [req:AUTH-07, test:e2e/reset.spec.ts] unique_id: 3b9e0c71a2f}action update_password { title: "Update password" }end done { type: success; description: "Password changed" }end expired { type: failure; description: "Link expired" }view sms_reset { title: "Reset by SMS code"; route: /forgot/sms; flags: [future] } begin --> forgotforgot --> send_link : [Send link] { payload: [email] }forgot --> sms_reset : [Use SMS instead] { flags: [future] }send_link --> email_linkemail_link ..> set_password : [Open link] validemail_link ..> expired : [Open link] expiredset_password --> update_password : [Save] { payload: [password] }update_password --> done@endujn