Nextauth requires a SECRET property

After checking the documentation it says that .env or [..nextAuth.js] file you should set a secret property in the configuration.

Error documentation to nextAuth

.env

NEXTAUTH_URL = "http://localhost:3000"
NEXTAUTH_SECRET_KEY="test"

[...nextAuth.js]

  secret: "test",
  jwt: {
    secret: "test",
    encryption: true,
    maxAge: 5 * 60,
  },
  pages: {
    signIn: "/auth/login",
  },

However, this is a requirement only if you are in production, but I am not. How to fix this error and set it on development, not in production?



from Recent Questions - Stack Overflow https://ift.tt/woPXAZr
https://ift.tt/t4nY2pl

Comments

Popular posts from this blog

Spring Elasticsearch Operations

Network Error and Timeout on Authorize.net JS

Object oriented programming concepts (OOPs)