Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Authenticate users via Figma OAuth 2.0 with createFigmaProvider. Covers app registration, redirect URI setup, and the file read scope needed for design file access.
createFigmaProvider
https://your-app.com/api/theauth/auth/oauth/callback/figma
import { createTheAuth } from '@glinr/theauth'; import { oauth, createFigmaProvider } from '@glinr/theauth/auth'; const theauth = await createTheAuth({ database: { provider: 'sqlite-native', url: 'theauth.db' }, secret: process.env.THEAUTH_SECRET!, baseUrl: 'https://your-app.com/api/theauth', auth: { session: { secret: process.env.THEAUTH_SECRET! } }, plugins: [ oauth({ providers: { figma: createFigmaProvider({ clientId: process.env.FIGMA_CLIENT_ID!, clientSecret: process.env.FIGMA_CLIENT_SECRET!, }), }, }), ], });
FIGMA_CLIENT_ID=... FIGMA_CLIENT_SECRET=...
file_read
/auth/oauth/authorize/figma
/auth/oauth/callback/figma