⚡ BolkAuth

Deploying BolkAuth mainly requires stable environment variables, reachable database connections, and exact OAuth callback URLs.

Environment Variables

BOLKAUTH_SECRET=
DATABASE_URL=
NEXT_PUBLIC_APP_URL=https://yourapp.com

GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=

NEXT_PUBLIC_APP_URL should be your public origin without a trailing slash.

OAuth Callback URLs

Register provider callback URLs with the /api/auth/oauth/:provider/callback pattern:

https://yourapp.com/api/auth/oauth/github/callback
https://yourapp.com/api/auth/oauth/google/callback

The protocol, domain, and path must match exactly.

Vercel

Set all environment variables in the Vercel project settings. For database connections, prefer serverless-friendly drivers or connection poolers:

DatabaseRecommended deployment shape
Neon PostgreSQLUse the pooled connection string.
Supabase PostgreSQLUse the pooler connection string for serverless.
PlanetScale MySQLUse the serverless driver or compatible pooled access.
MongoDB AtlasReuse a singleton MongoClient and set a sensible pool size.

Migrations

Run migrations before deploying code that expects new auth tables.

# Drizzle
pnpm drizzle-kit migrate
 
# Prisma
npx prisma migrate deploy

Static Export Note

The docs app may export static files, but a production app using BolkAuth must run server-side code for route handlers, middleware, Server Actions, and database access.

On this page