š Authentication environment variables
Blitzship uses Auth.js (opens in a new tab) for authentication. Auth.js requires a few environment variables to be set.
AUTH_URL
In your .env.{YOUR_STAGE_NAME}.local
file, set the AUTH_URL
to this: http://localhost:3000/api/auth (opens in a new tab). It should already be set correctly in the .env.example
file, so you don't have to change anything here.
For the production .env
file, however, it should look like this: https://app.your-domain.com/api/auth (opens in a new tab)
AUTH_SECRET
This is a random string that resides on your secure backend. Use openssl rand -base64 32
command in your terminal to generate such a string and simply paste it here.
If this guide is not enough and you want to know more about how Auth.js and these environment variables work, checkout the Auth.js docs (opens in a new tab).