visualization-tool
visualization-tool copied to clipboard
Check if secret is defined in PROD
Our server logs (on all environments) are full of warnings such as this:
[next-auth][error][NO_SECRET]
https://next-auth.js.org/errors#no_secret Please define a `secret` in production. MissingSecret [MissingSecretError]: Please define a `secret` in production.
at assertConfig (/usr/src/app/node_modules/next-auth/core/lib/assert.js:42:12)
at NextAuthHandler (/usr/src/app/node_modules/next-auth/core/index.js:70:52)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async NextAuthNextHandler (/usr/src/app/node_modules/next-auth/next/index.js:23:19)
at async auth (/usr/src/app/app/.next/server/chunks/8474.js:119:5)
at async Object.apiResolver (/usr/src/app/node_modules/next/dist/server/api-utils.js:101:9)
at async Server.handleApiRequest (/usr/src/app/node_modules/next/dist/server/next-server.js:775:9)
at async Object.fn (/usr/src/app/node_modules/next/dist/server/next-server.js:666:37)
at async Router.execute (/usr/src/app/node_modules/next/dist/server/router.js:205:32)
at async Server.run (/usr/src/app/node_modules/next/dist/server/next-server.js:846:29) {
code: 'NO_SECRET'
}
While not critical, it makes the logs more difficult than necessary to parse and understand. It also appears relatively straight-forward to clean up – see the links below:
https://next-auth.js.org/errors#no_secret https://next-auth.js.org/configuration/options#secret