SL
SkillsLao Learner Portal
Prototype

Verification Code

Enter the 6-digit code sent to your contact

Channel Email
Sent to user@example.com
Expires in 5:00 REF: REF-XXXXX
Change Method
๐Ÿ“ Spec notes โ€” SUC-IDP-01 / SCR-IDP.02 (fields, actions, requirements)
Identity
  • SUC: SUC-IDP-01 โ€” Authenticate via email verification code
  • Screen: SCR-IDP.02 โ€” Verification Code
  • Invoked by (Learner Portal): UC-IDP.01 (Register as Learner), UC-IDP.09 (Update Learner Profile), UC-IDP.22 (Forgot Password)
ReturnUrl context
  • Current: /forgot-password/reset-password
  • Fallback: / when returnUrl is empty
  • Finish โ†’ returnUrl; Cancel โ†’ cancelUrl (if provided) or returnUrl + &sub_cancelled=1
  • cancelUrl: /forgot-password/
Brief description

6-digit email verification code sub-flow. System sends the code before opening this page; user enters it; system verifies. Handles wrong code (inline error + retry), expired code (inline message + auto-resend), resend throttling, and 5-failure inline lockout (AF 3C / SS-IDP.01) โ€” all without page redirect.

Regions
  • Verification Code Delivery Info โ€” Channel (read-only), Sent to (read-only, always unmasked)
  • Verification Code Entry โ€” Verification Code (required, 6-digit numeric), Expires in (live countdown), REF (read-only)
  • Footer Actions โ€” Verify, Resend Verification Code, Change Method
Fields
  • delivery_channel "Channel" โ€” text ยท read-only ยท source: session.otp_channel ยท always
  • contact "Sent to" โ€” text ยท read-only ยท source: session.contact_full (full unmasked โ€” AR-7) ยท always
  • otp_code "Verification Code" โ€” text ยท required ยท always ยท validation: length:6, digits_only
  • countdown_remaining "Expires in" โ€” text ยท read-only ยท computed ยท always
  • ref_key "REF" โ€” text ยท read-only ยท source: session.otp_ref_key ยท always
Actions
  • verify "Verify" โ€” enabled when otp_code.length == 6 && !locked ยท triggers SUC-IDP-01-M-2
  • resend "Resend verification code" โ€” enabled when not locked ยท triggers SUC-IDP-01-A-3A-2
  • change_method "Change Method" โ€” always ยท back navigation to calling UC's method-selection screen
Additional requirements
  1. 5-minute countdown (SS-IDP.02); at 0:00 โ†’ inline expiry message + prompt Resend. [SS-IDP.02]
  2. Inline error below otp_code on invalid code: "Invalid verification code โ€” please try again." [โ€”]
  3. Auto-focus otp_code on page load; Verify enabled only when 6 digits filled. [NFR-09]
  4. AF 3C inline lockout: 5 wrong attempts โ†’ disable input + Resend, show lock panel with 15-min countdown; auto-reopen when lock expires. [SS-IDP.01]
  5. Resend during lock window โ†’ "You cannot request a new verification code at this time โ€” please wait 15 minutes." [SS-IDP.01]
  6. "Change Method" navigates back to the method-selection screen of the calling UC; target not hardcoded. [โ€”]
  7. contact always displayed full and unmasked โ€” email: full address; SMS: full number (e.g. +66812345678). session.contact_full must carry the unmasked value. [โ€”]