fix: accept access token response

This commit is contained in:
rain
2026-07-11 09:41:32 +08:00
parent 8a18202878
commit edc0a58a54
4 changed files with 20 additions and 3 deletions
@@ -16,7 +16,7 @@ Complete the PC journey from registration through login and personal-profile ret
`utils/ApiClient.js` owns token persistence under `genealogy_auth_token`.
1. Successful password login and SMS login must receive a nonempty response token, persist it, and then allow navigation to `profile.html`.
1. Successful password login and SMS login must receive a nonempty response token, persist it, and then allow navigation to `profile.html`. The current backend response uses `data.access_token`; the client also accepts `token`, `accessToken`, and `tokenValue` for declared compatibility.
2. A login response without a token is an authentication failure. The login page remains in place and no profile navigation occurs.
3. Successful registration removes any existing token and navigates to `login.html`. Registration never persists a response token.
4. A failed registration leaves existing token storage unchanged.