Should I use AUTH_SECRET or NEXTAUTH_SECRET?
Auth.js commonly uses AUTH_SECRET. Older NextAuth setups often use NEXTAUTH_SECRET. Match the variable name expected by your installed version.
// SECRET_KEY_USE_CASE
NextAuth and Auth.js use a secret to encrypt tokens, sign cookies, and protect authentication state. A stable production secret is required for reliable sessions.
AUTH_SECRET="..."
Base64URL, 64 characters
Auth.js commonly uses AUTH_SECRET. Older NextAuth setups often use NEXTAUTH_SECRET. Match the variable name expected by your installed version.
No. Production auth secrets should stay stable. Changing them can invalidate sessions and token encryption.