Platform & Access · Password update from reset link

Token-gated screen where a staff member sets a new password and confirmation.

AreaPlatform & Access
Routesupdate_password/:token
Centre modulesalways available
Staff levelsunauthenticated (token-bearing)
Modelsstaff-member
UI labelchange-password.success-message
Coverage2 use cases · 1 happy · 4 failure

How it works

The route pre-flights the token (isValidToken: 200 === checkToken.status) before rendering, so an expired link is detected on entry rather than on submit. The controller runs its own validate() that requires a password and checks the confirmation match before calling the API.

Use cases

Why someone opens this (2)

  • Completing a self-service password reset.
  • A newly created staff member setting their first password after the ‘send password email’ action.

Path map

flowchart LR
    F(["Password update from reset link"]):::feat
    F --> H1["Password changed"]:::ok
    F -.-> X1["Expired or tampered token"]:::bad
    F -.-> X2["Empty password"]:::bad
    F -.-> X3["Confirmation mismatch"]:::bad
    F -.-> X4["Weak password"]:::bad
    classDef feat fill:#4a5c8a,stroke:#4a5c8a,color:#ffffff,font-weight:bold
    classDef ok fill:#e3f1ea,stroke:#0d6b42,color:#0d4a2e
    classDef bad fill:#f7e6e2,stroke:#9a2d1c,color:#6e1f13

Happy paths

Password changed

  1. User opens the tokenised URL; the route validates the token against the API (HTTP 200).
  2. User types the new password twice.
  3. Local validation passes (non-empty, both fields match, format rules from the staff-member model).
  4. API accepts the change and change-password.success-message is shown.

Failure paths

QA checklist

Tick these off while regression-testing this feature. The boxes are plain Markdown, so progress is visible in git diffs.

  • ✅ Password changed
  • ⛔ Expired or tampered token
  • ⛔ Empty password
  • ⛔ Confirmation mismatch
  • ⛔ Weak password

Implementation


Generated from doc/feature-inventory.json · id platform-update-password · commit 276788ca6