feat(auth): support exact multi-account profile identities

Store DingTalk credentials in corpId:userId identity slots while retaining organization and legacy mirrors for forward compatibility.

Resolve organization, account, friendly-name, current, previous, and deletion selectors without silently choosing among ambiguous accounts.

Make identity tokens the source of truth, serialize migration and refresh reads, reject unsafe mirror recovery, and sweep orphan token entries during reset.

Persist token source and client ID for exact remote revocation, require user identity before first-login persistence, and add cross-platform regression coverage for migration, deletion, refresh, and keychain failures.
This commit is contained in:
audanye-sudo committed 2026-07-17 00:56:43 +08:00
1 parent 642e676f79
commit 93854178e3
18 files changed
+2590 -319

No files matched your search

@@ -20,3 +20,7 @@ package keychain
func platformValidateAuthTokenEntries(string) error {
return nil
}
func platformRemoveAuthTokenEntries(service string) error {
return registryRemoveAuthTokenEntries(service)
}