This commit is contained in:
25
openspec/changes/update-index-phone-bind-gate/proposal.md
Normal file
25
openspec/changes/update-index-phone-bind-gate/proposal.md
Normal file
@@ -0,0 +1,25 @@
|
||||
## Why
|
||||
|
||||
The current login flow decides whether to send the user to the bind-phone page based on `loginData.need_bind_phone`. This makes the phone-binding gate happen only at login time, which is fragile because the actual requirement belongs to entering the homepage, not only to completing login. As a result, the app can enter an inconsistent state when the user reaches `index` through other paths or when the latest bind requirement should be re-evaluated on homepage entry.
|
||||
|
||||
## What Changes
|
||||
|
||||
- Move the mandatory phone-binding gate out of `pages/login/login.vue`
|
||||
- Make login success redirect to `pages/index/index` consistently
|
||||
- Require `pages/index/index.vue` to check whether the current account still needs phone binding every time the page is entered
|
||||
- Redirect to `pages/bind/bind` from `index` when binding is required, instead of deciding that only during login
|
||||
- Keep the bind-phone page as the place where the user completes the required binding flow
|
||||
|
||||
## Capabilities
|
||||
|
||||
### New Capabilities
|
||||
- `index-phone-bind-gate`: Define homepage-entry binding rules so phone binding is enforced from `index` instead of only from login
|
||||
|
||||
### Modified Capabilities
|
||||
|
||||
## Impact
|
||||
|
||||
- Affected code: `pages/login/login.vue`, `pages/index/index.vue`, `pages/bind/bind.vue`
|
||||
- Affected flow: post-login routing, homepage entry, mandatory bind-phone redirect
|
||||
- No backend API changes
|
||||
- No login credential or bind-phone API contract changes
|
||||
Reference in New Issue
Block a user