title: How to define a JWT secret in next-auth to avoid errors in prod?
body: <p>How to define a JWT secret in NextAuth.js v4 to avoid errors in prod?
  I followed the instructions as they said in the documentation: <a href="https://next-auth.js.org/configuration/options#secret" rel="nofollow noreferrer">https://next-auth.js.org/configuration/options#secret</a>.</p>
  <p>And I still getting this warning (this link doesn't explain any details about):</p>
  <blockquote>
  <p>[next-auth][warn][NO_SECRET]</p>
  <p><a href="https://next-auth.js.org/warnings#no_secret" rel="nofollow noreferrer">https://next-auth.js.org/warnings#no_secret</a></p>
  </blockquote>
  <p>My <code>[...nextauth].js</code> looks like:</p>
  <pre><code>export default NextAuth({
    providers: [
      GoogleProvider({
        clientId: process.env.GOOGLE_CLIENT_ID,
        clientSecret: process.env.GOOGLE_CLIENT_SECRET
      })
    ],
    session: {
      strategy: &quot;jwt&quot;,
      maxAge: 30 * 24 * 60 * 60, // 30 days
      updateAge: 24 * 60 * 60, // 24 hours
    },
    jwt: {
      secret: process.env.JWT_SECRET,
      maxAge: 60 * 60 * 24 * 30,
      async encode({ secret, token, maxAge }) {},
      async decode({ secret, token }) {},
    },
  })
  </code></pre>
  <p><code>JWT_SECRET</code> was generated by <code>openssl rand -base64 32</code>.</p>