Auth.js AUTH_SECRET Generator

32 random bytes in base64, equivalent to openssl rand -base64 32.

Very strong0 bitsGenerated in your browser

Local alternative

openssl rand -base64 32

Prefer generating secrets on the machine that uses them? This command produces an equivalent value.

Official documentation

Auth.js, formerly NextAuth.js, signs and encrypts session tokens and JWTs with this value. It is mandatory in production and the application refuses to start without it. Changing the value signs out every logged-in user.

Frequently asked questions