From 5ad7fb4953a6060e94a87557b2bef7ecf8d843e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Orb=C3=A1n?= Date: Thu, 24 Oct 2024 19:40:38 +0100 Subject: [PATCH] docs: Update options.md --- docs/docs/configuration/options.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/docs/configuration/options.md b/docs/docs/configuration/options.md index 40d5ca3aeb..07ad0256ac 100644 --- a/docs/docs/configuration/options.md +++ b/docs/docs/configuration/options.md @@ -27,7 +27,11 @@ Using [System Environment Variables](https://vercel.com/docs/concepts/projects/e ### NEXTAUTH_SECRET -Used to encrypt the NextAuth.js JWT, and to hash [email verification tokens](https://authjs.dev/guides/creating-a-database-adapter#verification-tokens). This is the default value for the `secret` option in [NextAuth](/configuration/options#secret) and [Middleware](/configuration/nextjs#secret). +Used to encrypt the NextAuth.js JWT, and to hash [email verification tokens](https://authjs.dev/guides/creating-a-database-adapter#verification-tokens). This is the default value for the `secret` option in [NextAuth](/configuration/options#secret) and [Middleware](/configuration/nextjs#secret). Alternatively, you can also set `AUTH_SECRET`, which is an alias, and is the preferred naming going forward. + +:::tip +You can run `npx auth secret` our [CLI](https://cli.authjs.dev) - in your project's root, and it will autogenerate a random value and put it in your `.env.local` file. +::: ### NEXTAUTH_URL_INTERNAL