๐
Sub-flow: Authenticate via SMS Verification Code
SUC-IDP-02
This page is a sub-flow invoked from another use case โ when finished, control returns to the caller.
Verification Code
Enter the 6-digit code sent to your mobile number
Invalid verification code โ please try again.
Verification code has expired โ a new code has been sent.
Failed to send SMS โ please try again or change method.
SMS verification code channel temporarily locked
You entered the wrong verification code 5 times โ this channel is locked for 15 minutes.
Time remaining: 15:00
Channel
SMS
Sent to
+856 20 1234 5678
Expires in 5:00
REF:
REF-XXXXX
Screen Flow (per flow.puml):
๐ Spec notes โ SUC-IDP-02 / SCR-IDP.02 (fields, actions, requirements)
Identity
- SUC: SUC-IDP-02 โ Authenticate via SMS verification code
- Screen: SCR-IDP.02 โ Verification Code
- Invoked by (Backoffice Portal): UC-IDP.10 (Update Instructor Profile), UC-IDP.11 (Update Staff Profile) โ contact re-verification on mobile/phone number change; UC-IDP.22 (Forgot Password) does not use this SUC in Backoffice โ SMS is not a staff/instructor login channel per FEAT-IDP.01
ReturnUrl context
- Current:
/update-instructor-profile/ - Fallback:
/when returnUrl is empty - Finish โ returnUrl; Cancel โ cancelUrl (if provided) or returnUrl +
&sub_cancelled=1 - cancelUrl:
/update-instructor-profile/
Brief description
6-digit SMS 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 ยท alwayscontact"Sent to" โ text ยท read-only ยท source: session.contact_full (full unmasked โ AR-7) ยท alwaysotp_code"Verification Code" โ text ยท required ยท always ยท validation: length:6, digits_onlycountdown_remaining"Expires in" โ text ยท read-only ยท computed ยท alwaysref_key"REF" โ text ยท read-only ยท source: session.otp_ref_key ยท always
Actions
verify"Verify" โ enabled whenotp_code.length == 6 && !lockedยท triggers SUC-IDP-02-M-2resend"Resend verification code" โ enabled when not locked ยท triggers SUC-IDP-02-A-3A-2change_method"Change Method" โ always ยท back navigation to calling UC's method-selection screen
Additional requirements
- 5-minute countdown (SS-IDP.02); at 0:00 โ inline expiry message + prompt Resend. [SS-IDP.02]
- Inline error below otp_code on invalid code: "Invalid verification code โ please try again." [โ]
- Auto-focus otp_code on page load; Verify enabled only when 6 digits filled. [NFR-09]
- 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]
- Resend during lock window โ "You cannot request a new verification code at this time โ please wait 15 minutes." [SS-IDP.01]
- "Change Method" navigates back to the method-selection screen of the calling UC; target not hardcoded. [โ]
contactalways displayed full and unmasked โ SMS: full number (e.g. +856 20 1234 5678).session.contact_fullmust carry the unmasked value. [โ]