Feature/relogin flow#2267
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4bc15b9c85
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| cookieHeaderToWebCookieSeeds( | ||
| cookieHeader = chocolate, | ||
| domain = xqtHost, | ||
| ) | ||
| }.orEmpty() |
There was a problem hiding this comment.
Avoid treating seeded X cookies as a completed relogin
When a relogin target exists, this seeds the WebView with the account's stored X cookies. If those cookies are expired but still contain ct0 and auth_token, the WebView polling path immediately feeds the seeded cookie string back to the handler, and canResume returns true because it only checks for those names. The login sheet closes and resume retries the same expired credential before the user can authenticate, leaving X relogin stuck in a failure loop until the old cookies are not seeded or are server-validated before closing.
Useful? React with 👍 / 👎.
| cookieHeaderToWebCookieSeeds( | ||
| cookieHeader = chocolate, | ||
| domain = vvoHost, | ||
| ) | ||
| }.orEmpty() |
There was a problem hiding this comment.
Avoid treating seeded Weibo cookies as a completed relogin
For Weibo relogin this seeds the WebView with the existing stored cookie, but canResume only checks that the cookie string still has MLOGIN=1. An expired Weibo cookie can still satisfy that syntactic check, so the WebView callback fires immediately on the seeded cookie, closes the login UI, and resume fails with the old credential before the user can actually log in again.
Useful? React with 👍 / 👎.
8197d99 to
af4eb2c
Compare
fix #2160
fix #1820