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.

9 screens and steps8 arrows0 warnings

What UJN shows here Point at a note to see its part of the drawing

Password reset  RESETReset by email link; reset by SMS is plannedStartStartForgot password (View) Enter your email Route: /forgotViewForgot passwordEnter your email/forgotSend reset link (Message) Channel: emailMessageSend reset linkemailReset link (Handoff, returns) The user opens their inbox Channel: email Timeout: 30 min Resume: /reset/:tokenHandoff, returnsReset linkThe user opens their inboxemail · 30 minSet new password (View) Route: /reset/:token Trace: req:AUTH-07, test:e2e/reset.spec.ts Id: unique id 3b9e0c71a2fViewSet new password/reset/:tokenUpdate password (Action)ActionUpdate passwordEnd, success Password changedEnd, successPassword changedEnd, failure Link expiredEnd, failureLink expiredReset by SMS code (View) Route: /forgot/sms Flags: future (planned for a later release)ViewReset by SMS code/forgot/sms»No label Navigation from begin to Forgot passwordSend link Navigation from Forgot password to Send reset link Payload: {email}Send link{email}Use SMS instead Navigation from Forgot password to Reset by SMS code Flags: future (planned for a later release)Use SMS instead»No label Navigation from Send reset link to Reset linkOpen link · valid Return, resume from Reset link to Set new passwordOpen link · validOpen link · expired Return, resume from Reset link to expiredOpen link · expiredSave Navigation from Set new password to Update password Payload: {password}Save{password}No label Navigation from Update password to doneLegendShapesArrowsFlagsStartViewMessageHandoff, returnsActionEnd, successEnd, failureNavigationReturnFlagged, or after a flag»future· Planned for a later release
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