Repository navigation
Description
What happens
Completing the X-to-Bluesky migration's OAuth flow never returns to Cyd. The browser ends the redirect chain with:
Prevented navigation to “cyd-dev://bluesky-oauth/?state=REDACTED&iss=https%3A%2F%2Fbsky.social&code=REDACTED” due to an unknown protocol.
The user is left unauthenticated, and no callback ever reaches the app.
(The state and code values are redacted here; an authorization code is an account-control credential.)
Why
The redirect target does not match what the desktop app registers or handles, in both the scheme and the path.
| Scheme | Path | |
|---|---|---|
| Redirect sends | cyd-dev:// |
/bluesky-oauth/ |
| Cyd registers/handles | social.cyd.dev-api: (prod: social.cyd.api:) |
/atproto-oauth-callback/ |
Evidence in this repo:
src/main.ts:152-155—setAsDefaultProtocolClient()registers onlysocial.cyd.api/social.cyd.dev-api.forge.config.ts:141-156,315,328— packaged.deb/.rpmregister only the same two schemes asx-scheme-handler/…mime types. So this is not a dev-run-only gap; a packaged build has nocyd-dev://handler either.src/main.ts:122-141—openCydURL()dispatches the Bluesky callback only for pathname/atproto-oauth-callback/. Anything else falls through to the "Invalid Cyd URL" dialog. Nothing insrc/referencesbluesky-oauth.
The redirect chain
https://bsky.social/oauth/authorize→https://dev-api.cyd.social/bluesky/redirect— the only entry inredirect_urisin the published client metadata athttps://dev-api.cyd.social/bluesky/client-metadata.json, which the app names inBlueskyService.initClient()(src/account_x/controller/bluesky/BlueskyService.ts:128-137) →https://cyd.social/bluesky-redirect-to-cyd-dev/?state=…&iss=…&code=…→cyd-dev://bluesky-oauth/?…← fails here
Steps 2 and 3 live outside this repo, in cyd-server and cyd.social (both private), so the fix is likely there rather than here: the final hop should emit social.cyd.dev-api://atproto-oauth-callback/?… (and social.cyd.api://atproto-oauth-callback/?… for prod).
Worth deciding deliberately rather than just patching the string: whether the desktop should also accept cyd-dev:// / cyd:// for compatibility, and whether the scheme and path belong in one shared constant instead of being spelled out independently in three places across three repos.
Reproduce
- Run Cyd dev and add an X account.
- X wizard → Migrate to Bluesky → Connect, and complete authorization at Bluesky.
- The browser refuses the final navigation; Cyd stays disconnected.
Impact
The X-to-Bluesky migration cannot be connected at all through the normal flow. It also blocks the manual verification checklist in docs/security/credential-store.md for #671 / #698, whose "Connect" steps all assume the callback arrives. Injecting the query string directly into X:blueskyCallback from the renderer console exercises the credential-store write path, but is not a substitute for testing the real flow.
(This was written by an LLM.)
Activity
Stop logging the Bluesky OAuth authorization code
micahflee commentedon Sep 11, 2026
Folded into #674.
The fix belongs with the shared Bluesky OAuth work rather than beside it. #674 now unifies the X migration's OAuth and the Bluesky platform's OAuth into one module with a DID-keyed credential store, and the callback scheme and path become a single shared constant — which is the deliberate fix this issue asked for instead of patching the string in three places.
The cross-repo hops in
cyd-serverandcyd.socialare carried as an acceptance criterion there, along with an end-to-end authorization actually reaching the app. The analysis in this issue stays the reference for that work.(This was written by an LLM.)
Tighten the shared Bluesky OAuth module after review
Share one Bluesky OAuth implementation across platforms