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 Polar OAuth 2.0. Register an OAuth app in Polar settings, configure the polar provider, and request organizations:read for org access.
polar
organizations:read
https://your-app.com/api/theauth/auth/oauth/callback/polar
import { createTheAuth } from '@glinr/theauth'; import { oauth, polarProvider } 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: { polar: polarProvider( process.env.POLAR_CLIENT_ID!, process.env.POLAR_CLIENT_SECRET!, ), }, }), ], });
POLAR_CLIENT_ID=... POLAR_CLIENT_SECRET=...
openid
profile
email
/auth/oauth/authorize/polar
/auth/oauth/callback/polar