This guide mirrors the Vercel integration flow in the Stack Auth dashboard app.Documentation Index
Fetch the complete documentation index at: https://stackauth-e0affa27-chore-move-mcp-to-a-sep-app.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
What this integration covers
- Generate Stack Auth keys for your project
- Add the required environment variables in Vercel
- Redeploy and verify the auth flow
Setup
Open your Vercel project
In the Vercel dashboard, open the project you want to connect to Stack Auth.Open Vercel dashboard
Generate keys from Stack Auth
In your Stack dashboard, open the Vercel Integration app and generate keys for your project.This produces a project ID plus API keys that you can paste into Vercel.
Add environment variables in Vercel
In Vercel, go to Project -> Settings -> Environment Variables and add:
NEXT_PUBLIC_STACK_PROJECT_IDNEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEYSTACK_SECRET_SERVER_KEY
NEXT_PUBLIC_STACK_API_URL only if you are not using the default hosted Stack API.Redeploy
Trigger a new deployment so Vercel picks up the new environment variables.If you use both preview and production environments, make sure both are updated.
Notes
- Keys are sensitive. Store server keys only in server-side environment variables.
- If authentication fails after setup, confirm variable names are exact and redeploy again.