This is a Next.js project bootstrapped with create-next-app.
Copy the template and fill in your values:
cp .env.local.example .env.local| Variable | Where to get it |
|---|---|
AUTH_SECRET |
Generate: openssl rand -base64 32 |
AUTH_GOOGLE_ID |
Google Cloud Console → APIs & Services → Credentials → OAuth 2.0 Client ID |
AUTH_GOOGLE_SECRET |
Same as above |
AUTHORIZED_EMAIL |
Your Google account email — the only address allowed to sign in |
fast_track_DATABASE_URL_UNPOOLED |
Vercel Postgres dashboard → your database → .env.local tab (the UNPOOLED connection string) |
Google OAuth redirect URIs — add these in Google Cloud Console under your OAuth client:
- Development:
http://localhost:3000/api/auth/callback/google - Production:
https://your-vercel-domain.vercel.app/api/auth/callback/google
bunx prisma migrate dev --name init-authbun devOpen http://localhost:3000 with your browser to see the result.
Set the following environment variables in your Vercel project settings (Settings → Environment Variables):
| Variable | Notes |
|---|---|
AUTH_SECRET |
Same value as local — do not reuse across projects |
AUTH_GOOGLE_ID |
From Google Cloud Console |
AUTH_GOOGLE_SECRET |
From Google Cloud Console |
AUTHORIZED_EMAIL |
Your Google account email |
fast_track_DATABASE_URL_UNPOOLED |
Auto-populated when you link a Vercel Postgres database to the project |
Tip: If you link a Vercel Postgres database to your project,
fast_track_DATABASE_URL_UNPOOLED(and otherfast_track_*vars) are added automatically.
Security:
AUTHORIZED_EMAILmust never be prefixed withNEXT_PUBLIC_— it is server-side only.
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.