2.7 KiB
2.7 KiB
ADDED Requirements
Requirement: Login success SHALL NOT own the bind-phone routing decision
The system SHALL stop deciding mandatory bind-phone routing inside the login success handler and SHALL route successful login into the homepage entry flow instead.
Scenario: Login succeeds for a user who may need binding
- WHEN the user completes login successfully
- THEN the system SHALL route the user to
pages/index/index - AND the system SHALL NOT branch directly from the login page to the bind-phone page based only on login-time routing logic
Requirement: Index entry SHALL enforce the bind-phone gate
The system SHALL determine whether phone binding is required whenever the homepage is entered and SHALL redirect to the bind-phone page if the current account is not yet bound.
Scenario: User enters index and binding is required
- WHEN the user enters
pages/index/index - AND the latest account state indicates the phone is not yet bound
- THEN the system SHALL redirect the user from
indextopages/bind/bind
Scenario: User enters index and binding is not required
- WHEN the user enters
pages/index/index - AND the latest account state indicates the phone is already bound
- THEN the system SHALL keep the user on the homepage
Scenario: User re-enters index later without binding
- WHEN the user enters
pages/index/indexagain through a later navigation path - AND the latest account state still indicates the phone is not yet bound
- THEN the system SHALL re-apply the bind-phone redirect
- AND the redirect SHALL NOT depend on whether the user just came from the login page
Requirement: Bind completion SHALL remain compatible with homepage entry
The system SHALL preserve the existing bind-phone completion destination to the homepage while allowing the homepage gate to be the source of truth for whether binding is still required.
Scenario: User completes binding and returns to index
- WHEN the user completes phone binding successfully
- THEN the system SHALL return the user to
pages/index/index - AND entering
indexafterward SHALL no longer redirect if the account is now bound
Requirement: Index phone-bind gate SHALL NOT change login or bind API contracts
The system SHALL preserve the existing login API, bind-phone API, token handling, and account retrieval contracts while changing only the routing responsibility.
Scenario: Routing responsibility changes without API change
- WHEN the new homepage-entry gate is applied
- THEN the system SHALL change only where the bind requirement is evaluated for routing
- AND the system SHALL NOT require backend API contract changes