fix(auth): harden macOS Google sign-in, session persistence, and login popup - #41
Open
mihaimetal wants to merge 5 commits into
Open
fix(auth): harden macOS Google sign-in, session persistence, and login popup#41mihaimetal wants to merge 5 commits into
mihaimetal wants to merge 5 commits into
Conversation
4 tasks
mihaimetal
force-pushed
the
fix/macos-auth
branch
from
July 27, 2026 13:43
e8f634a to
5327290
Compare
Author
|
Rebased onto current |
mihaimetal
force-pushed
the
fix/macos-auth
branch
from
July 27, 2026 14:30
5327290 to
8d92374
Compare
mihaimetal
force-pushed
the
fix/macos-auth
branch
from
August 2, 2026 07:48
8d92374 to
c1dabbb
Compare
…n popup Rebased on 0.4.2 (preserves upstream atomic jar writes, power-resume refresh, and auth-presence UI): - Per-account WKWebsiteDataStore ids (transferable on re-login dedup) - Wipe residual HTTPStorages on sign-out; hand off via www.youtube.com - Seed cold keepers from cookies.enc; destroy keeper after each refresh - File-backed AES key (no Keychain prompts on ad-hoc rebuilds) - Fail WebAuthn early in the login popup so Google offers password path - Last-account sign-out is a full wipe from the sidebar
Prefer the file-backed AES key so ad-hoc rebuilds stay signed in. When an older Keychain key still exists and disagrees with a stale file key, prefer Keychain and re-migrate it into Application Support.
Reading or writing the system keyring after an ad-hoc macOS rebuild pops the Keychain ACL dialog and can swap in a different AES key than the app-data file, stranding the session between builds. Make the file key the only steady-state source: consult Keyring only when the file is missing (one-time upgrade migrate), never write Keychain items, and never fall back to Keychain when a file key is already present.
mihaimetal
force-pushed
the
fix/macos-auth
branch
from
August 2, 2026 18:27
2021df6 to
10b176f
Compare
… key Some installs still have an experimental app-data file key that cannot open a jar sealed by the older pure-Keychain path. Trying Keychain on every launch re-prompts after each ad-hoc rebuild; never trying it strands the session forever. Keep the file key as the only steady-state source, but if that key fails to open the jar, consult Keychain once (marker file prevents repeat prompts), and on success replace the file key so later rebuilds stay silent and signed in.
Remove the keyring crate and every Keychain/Secret Service code path. Cookie jars are AES-GCM sealed with a 32-byte key stored only under Application Support (mode 0600). Ad-hoc macOS rebuilds no longer trigger ACL permission dialogs, and the session key is stable across rebuilds. Jars previously sealed only under Keychain cannot be opened without that key; sign in once after upgrading so the jar is re-sealed with the file key.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
www.youtube.com, don’t interrupt 2FA.Context
WKWebView does not isolate Google sessions the way WebView2
data_directorydoes. Extracted cookies also die without a real browser refresh. Separately, Keychain-bound encryption keys break across ad-hoc code signatures, which made every local rebuild look signed out and left successful Google logins stuck in the popup only. Passkeys forgoogle.comcannot work in an embedded WebView without Apple’s browser-only entitlement.Test plan