fix: allow subdomain of acode.app#2179
Conversation
Greptile SummaryThis PR addresses two previously flagged issues with the cookie-based auth token flow in the Android WebView plugin: it switches to a domain-scoped cookie (
Confidence Score: 5/5This PR is safe to merge — the cookie migration and domain-scoped token logic are correct and directly address the two previously raised concerns. The migration guard is properly gated by a persistent flag, runs before the new cookie is written, and clears host-bound legacy cookies with the correct matching attributes so Chromium's cookie store will accept the eviction. The new clearTokenCookie now carries the same Secure/HttpOnly/SameSite=None flags as the original set call, closing the silent-ignore risk. No new defects were introduced. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant App as pluginInitialize
participant Prefs as EncryptedPrefs
participant CM as CookieManager
App->>Prefs: getBoolean(KEY_MIGRATED_V2)
alt Not yet migrated
App->>CM: "clear host-bound token on acode.app (Max-Age=0)"
App->>CM: "clear host-bound token on dev.acode.app (Max-Age=0)"
App->>CM: flush
App->>Prefs: setBoolean(KEY_MIGRATED_V2, true)
end
App->>Prefs: getString(KEY_TOKEN)
alt Token exists
App->>CM: "set Domain=.acode.app scoped token cookie"
App->>CM: flush
Note over CM: Cookie now covers all subdomains of acode.app
end
Note over App,CM: On logout
App->>CM: "delete Domain=.acode.app token cookie (Max-Age=0, Secure)"
App->>CM: flush
Reviews (3): Last reviewed commit: "fix: handle legacy auth" | Re-trigger Greptile |
|
@greptile_apps review again |
|
@greptile_apps review again |
No description provided.