Skip to content

feat(connectors): use the fixed sign-in redirect for all connectors - #167

Merged
nixuuu merged 1 commit into
devfrom
feat/oauth-fixed-redirect-all
Nov 5, 2026
Merged

nixuuu merged 1 commit into
devfrom
feat/oauth-fixed-redirect-all

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 5, 2026

Copy link
Copy Markdown
Member

The fixed sign-in redirect from #162 (https://itsoltech.github.io/canopy/oauth/callback) now covers every OAuth connector where it is safe, not just apps registered by hand.

Which connectors use it

  • Slack and GitHub OAuth apps, as before.
  • Dynamic client registration (DCR) servers when their metadata advertises PKCE S256: Notion, Linear, Atlassian, custom MCP servers, and configured Microsoft 365 / Google Workspace endpoints. Their DCR registration uses redirect_uris = [fixed URL], and the authorize request and token exchange send the same redirect_uri.

Which keep the installation's own callback

  • Servers that don't advertise S256.
  • Existing DCR registrations, until the user reconnects. On reconnect the client is registered again, but only when the redirect or issuer changed.
  • Hand-registered apps saved with the installation callback.
  • Everything, when CANOPY_OAUTH_REDIRECT_URL is set to the installation's own callback.

What every connector on the fixed redirect gets: the desktop return through canopy://oauth/callback and the paste-code fallback. The gateway checks state as before: single-use, owner-bound, short-lived, with the full-state hash.

Tests: gateway integration with the fake OAuth and local MCP fixtures:

  • a DCR server with S256 gets the fixed redirect;
  • a server without S256 keeps the installation callback;
  • an old registration keeps working, and reconnect migrates it;
  • paste-code works for DCR;
  • the desktop state routes to the deep link.

docs/connectors.md is updated.

Copy audit (docs/copy.md §8): no UI text changed.

Still needs a live check: DCR acceptance by real providers, reconnect migration, opening the desktop deep link, and paste-code.

@nixuuu
nixuuu merged commit e6664d8 into dev Nov 5, 2026
9 checks passed
@nixuuu
nixuuu deleted the feat/oauth-fixed-redirect-all branch November 5, 2026 10:56
nixuuu added a commit that referenced this pull request Nov 5, 2026
Stage 5 of 7 of shared configuration across linked computers. The design
is in `docs/linked-computers.md`.

**What changes**
- **Shared:**
- connected accounts: type, name, URL, transport, all-workers/all-bots
access and tool list;
- their credentials and headers, encrypted with each receiver's own key;
  - OAuth apps (client id and secret).
- **OAuth refresh:** a refresh replicates as a secret field change. A
computer that holds an older refresh token defers to the newer clock.
The rare "needs reconnect" race in the design is accepted.
- **Identity merge:** accounts with the same type, URL and account merge
and get aliases. A skill source's `credentialAccountId` maps through
those aliases.
- **Stays local:**
- per-computer status, last use and namespace, shown as "This computer";
  - worker grants, which come in stage 6;
  - bot grants, which stay with the bot's home.
- **Notices:** conflicts and deletions show a notice with Restore.
Delete keeps the encrypted credentials for the 90-day restore.
Disconnect revokes access.
- **Fixed OAuth redirect:** the behaviour from #162 and #167 is kept
(deep link, paste-code).

**Migration:** `0077_config_connectors` (`updated_at` on OAuth apps). No
new proto fields.

**Tests:** the connector integration suite (8 tests) covers:
- an account connected on A works on B without a reconnect;
- a refresh on A replicates to B, and B's older token loses;
- a rename conflict, and delete with Restore;
- secrets never reach history, logs or the BFF, and never cross a link
with sharing off;
- the source-account alias;
- owner scoping;
- the migration.

Copy audit (`docs/copy.md` §8):
- The obsolete local-only text is removed.
- Delete and disconnect are worded so each says what it does.
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