Jovan131 / We-Love-CS2030

Repository for Orbital Project
https://we-love-cs-2030.vercel.app
1 stars 1 forks source link

Replace next-auth secret with a real secret #21

Closed Jovan131 closed 1 year ago

Jovan131 commented 1 year ago

Reason: A secret is a random string used to hash tokens, sign/encrypt cookies and generate cryptographic keys. Thus, a strong secret is necessary to ensure security, especially in production.

Steps:

  1. Open Git Bash.
  2. Run the following command: openssl rand -base64 32
  3. A random base-64 encoded string of 32 bytes will be generated.
  4. Use this string as the new next-auth secret by replacing the relevant environment variable, both in local machine (development) as well as on Vercel (production).
  5. Done!