Bohan Wang
Bohan Wang2w ago

Get `Missing CONVEX_AUTH_ADAPTER_SECRET environment variable` with next-auth

I followed all the steps in https://stack.convex.dev/nextauth and https://stack.convex.dev/nextauth-adapter, I also set the variables in my .env.local, but it's not working.
Convex with Auth.js (NextAuth)
Learn how to use Auth.js with your Next.js server and Convex backend to build a full-featured authentication system.
4 Replies
Convex Bot
Convex Bot2w ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
Bohan Wang
Bohan WangOP2w ago
I have the variables both in dashboard and .env.local
No description
No description
Bohan Wang
Bohan WangOP2w ago
@Michal Srb
ian
ian7d ago
Are they set in the vercel or convex dashboard? And in the environment you are trying to use it in (dev / prod)? I would suggest doing Convex Auth instead btw. https://labs.convex.dev/auth - it's based on Next Auth (Auth.js) but more tightly integrated for Convex
Convex Auth - Convex Auth
Authentication library for your Convex backend

Did you find this page helpful?