Skip to content

fix(auth): migrate legacy macOS Keychain credentials - #3863

Open
wgqqqqq wants to merge 1 commit into
mainfrom
wgq/macos-keychain-migration
Open

wgqqqqq wants to merge 1 commit into
mainfrom
wgq/macos-keychain-migration

Conversation

@wgqqqqq

@wgqqqqq wgqqqqq commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

Problem

After the macOS credential backend moved from Keychain to the encrypted file vault, existing subscription metadata could remain visible while its Keychain token chunks were no longer readable. Those accounts were shown as requiring reauthentication even though the credentials were still present in the legacy store.

Change

  • Read historical macOS Keychain service names during subscription-store loading.
  • Migrate legacy v2 chunked OAuth/API credentials into the current file vault.
  • Migrate the older combined JSON credential shape and upgrade its metadata.
  • Keep migration serialized, retryable, idempotent, and non-destructive; legacy Keychain entries are preserved.
  • Add isolated tests for v2 chunk migration, legacy metadata upgrade, and post-migration reads.

Validation

  • cargo test --locked -p openbitfun-ai-adapters --features subscription-auth --lib subscription_auth
    • 139 passed, 5 existing live tests ignored.
  • cargo check --locked -p openbitfun-ai-adapters --features subscription-auth --lib
  • pnpm run fmt:rs
  • git diff --check

pnpm run check:core-boundaries remains blocked by an existing missing generated file under src/apps/desktop/probes/remote-desktop/target/cxxbridge.

This PR was AI-assisted and fully tested with the focused subscription-auth suite.

@wgqqqqq
wgqqqqq force-pushed the wgq/macos-keychain-migration branch from 28563e9 to 005c179 Compare November 10, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant