Docs
Authentification
Authentification
How to config the authentification.
Update auth_secret variable
The only environment variable that is mandatory is the AUTH_SECRET
. This is a random value used by the library to encrypt tokens and email verification hashes. You can generate one via running:
Alternatively, you can use the openssl
CLI, openssl rand -base64 33
.
Then add it to your .env
file:
Update google client variables
In this section, you can update these variables:
Video explanation
Watch a youtube video from CodeWithAntonio on how to configure the environment variables for NextAuth with Google authentication.
The auth part is similar at the authjs documentation.