Plugins

Figma

Official plugin — Figma sign-in with HTTP Basic client auth and no email verification signal.

Figma is OAuth2 with two twists: the token endpoint uses HTTP Basic instead of a body field, and the API exposes no verification flag — so emails are always unverified.

The one rule

Register your exact callback URI in the Figma app, seed the client secret, and expect unverified emails — new accounts only, never takeovers.

Quick start

Create an app

Figma → Settings → Security → Personal access tokens / OAuth apps → create an OAuth app. Add https://app.example.com/auth/oauth/callback/figma as a callback URL.

Plug it

src/app.ts
import { oke } from "okengine";
import { oauth } from "okengine/plugins";

export const app = oke({
  name: "shop",
  env: "dev",
  gate: { auth: {} },
}).plug(
  oauth({
    baseUrl: "https://app.example.com",
    providers: {
      figma: { enabled: true },
    },
  }),
);

Set the client secret

# .env.local
OAUTH_FIGMA_CLIENT_SECRET=...

The driver sends it as Authorization: Basic base64(client_id:client_secret) on the token call.

How identity works

AspectBehavior
Token exchangePOST https://api.figma.com/v1/oauth/token with the Basic header + PKCE verifier
ProfileGET https://api.figma.com/v1/me
Subjectid, falling back to handle when absent
Email trustalways unverified — no verification field exists

Default scopes: file_read. Trim this to what you actually need; sign-in itself requires nothing beyond defaults.

Options

OptionTypeDefaultMeaning
enabledbooleanfalseTurn the provider on
clientIdstringVault/env*\*OAUTH_FIGMA_CLIENT_ID
redirectUristring{baseUrl}…/figmaExact registered URI
scopesstring[]driver defaultsExtra scopes
storeProviderTokensbooleanfalseKeep tokens in Vault

Surfaces

FlowPath
StartPOST /auth/oauth/figma/start
CallbackGET+POST /auth/oauth/callback/figma
LinkPOST /auth/oauth/figma/link

Troubleshooting

Learn more

  • OAuth — shared flows and security model
  • GitHub — OAuth2 with real verification signal
  • Vault — where secrets live

Next

On this page