Skip to content

Figma signs in with Coderhelm's public Figma app, on hosted and through the broker on hybrid installs - #521

Merged
nambok merged 1 commit into
mainfrom
figma-coderhelm-app
Nov 8, 2026
Merged

nambok merged 1 commit into
mainfrom
figma-coderhelm-app

Conversation

@nambok

@nambok nambok commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Figma signs in with Coderhelm's own public Figma app, the same way Notion, Confluence and Google Drive do: one button on the hosted service, and on a hybrid install through the hosted broker. The team's own Figma app (#518) and a key stay as the other choices.

Figma needs one redirect URL for every team and every install: https://app.coderhelm.com/settings/integrations/mcp-callback/. An install never sends its own address to Figma. The hosted callback page hands the answer to POST /hybrid/oauth/callback, which finishes the sign-in in a holding partition and sends the browser to the install's own callback page (checked against the install's origins by redirect_allowed) with a one-time code. The code becomes the install's only when the install redeems it with its registration secret and its PKCE verifier. Figma's refresh token and Coderhelm's client secret stay on the hosted side. The install gets ten-minute access tokens and renews them with a grant handle.

Changes

  • mcp_catalog::OwnApp names the secret keys of Coderhelm's app (figma_client_id, figma_client_secret); the gateway's Secrets reads both.
  • mcp_remote::own_app: use_coderhelm_app (directly with the app from the secret, or through the broker), brokered_record, and source (whose app a record uses). One record per server, so switching apps ends the old sign-in and reconnecting with the same app keeps it.
  • Hosted broker (routes/hybrid.rs): a Brokered provider is a knowledge source or a catalog app (Figma). Authorize, callback, token and revoke serve Figma unchanged otherwise. Figma is offered to installs only once both keys are in the hosted secret.
  • Hybrid integrations list: Figma is a hosted tool. Installs choose Coderhelm's app or their own like the other tools, and it defaults to Coderhelm's app unless the install has its own Figma app in its secret.
  • POST /api/mcp-servers/apps/:catalog_id/coderhelm (integrations capability) starts the sign-in. The Figma card's detail has coderhelm_app, and own_app.source says whose app signed in. The card says "Signed in with Coderhelm's app."
  • Docs: self-host integrations and hybrid pages, and the operator note for the Figma app.

Verification

  • cargo fmt --check, cargo clippy -D warnings (common, gateway, worker), cargo test for common, gateway and worker: see the PR checks.
  • New tests: Coderhelm's app signs in at Figma with its own client and a single-use state (a forged or reused state finishes nothing); no app and no broker means no authorize address; a hybrid install signs in through the broker (install id and registration secret as the client, PKCE, its own callback) and renews at the broker with the handle, never at Figma; switching apps ends the old sign-in; the broker builds Figma's record with Coderhelm's client and the right scopes; Figma is offered only with both keys; the broker returns only to the install's own callback page; card states for Coderhelm's app.
  • Not run against Figma: the app is not registered yet. Once the keys are in the hosted secret, sign in on the hosted Figma card, then on a hybrid install.

@nambok
nambok merged commit 57cf041 into main Nov 8, 2026
10 checks passed
@nambok
nambok deleted the figma-coderhelm-app branch November 8, 2026 16:52
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