Deploying BolkAuth mainly requires stable environment variables, reachable database connections, and exact OAuth callback URLs.
Environment Variables
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:
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:
| Database | Recommended deployment shape |
|---|---|
| Neon PostgreSQL | Use the pooled connection string. |
| Supabase PostgreSQL | Use the pooler connection string for serverless. |
| PlanetScale MySQL | Use the serverless driver or compatible pooled access. |
| MongoDB Atlas | Reuse a singleton MongoClient and set a sensible pool size. |
Migrations
Run migrations before deploying code that expects new auth tables.
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.