PR Includes the following updates
packages/cli/src/lib/oauth-store.ts
- Added
handles?: Record<string, string>to the OAuthStore interface for DID-to-handle mapping - Added
setOAuthHandle(did, handle)to store handles after login - Added
getOAuthHandle(did)to retrieve stored handles - Added
listOAuthSessionsWithHandles()to list sessions with their handles
packages/cli/src/commands/login.ts
- Imports the new functions from
oauth-store - After successful OAuth callback, saves the handle using
setOAuthHandle() - Updated
--listto show handles: - yourhandle.bsky.social (did:plc:xxx)
packages/cli/src/commands/publish.ts
- Now uses
listAllCredentials()instead oflistCredentials() - Identity selection shows both OAuth and App Password options with appropriate labels
- OAuth sessions display their stored handle if available
packages/cli/src/commands/sync.ts
- Same changes as publish.ts for consistent identity selection UX
packages/cli/src/lib/credentials.ts
- Updated
tryLoadOAuthCredentials()to:- Use stored handle when looking up by DID
- Support handle-based lookup (find OAuth session by handle)
- Updated single-identity auto-selection to use stored handle
All changes maintain backwards compatibility - existing oauth.json files without the handles field will continue to work (handles will display as DIDs until the user re-logs).