2 Answers
- Newest
- Most votes
- Most comments
1
Hi - Our recommendation is to not use environment variables to store secrets. Store secrets in an environment secret created using the AWS Systems Manager Parameter Store.
Reference : https://docs.aws.amazon.com/amplify/latest/userguide/environment-variables.html
0
Ok, so I was able to log the env variables from Param Store, so that is not the issue. Is this the best forum on AWS to ask about NextAuth?
answered 10 months ago
Relevant content
- asked a year ago
- Accepted Answerasked 4 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
Thank you! I moved all of my env variables as you suggested and still get this in the logs:
INIT_START Runtime Version: nodejs:16.v15 Runtime Version ARN: arn:aws:lambda:us-east-2::runtime:ce158dcc19c42286fef86a8dfb67e1efd92d0de18828736a00f3698410aabcb3 2023-07-14T14:24:47.439-06:00 LOGS Name: bootstrap State: Subscribed Types: [Platform, Function] 2023-07-14T14:24:48.222-06:00 START RequestId: 682f871d-4492-43c8-8b2f-9479064951e7 Version: $LATEST 2023-07-14T14:24:50.270-06:00 [next-auth][error][NO_SECRET] 2023-07-14T14:24:50.270-06:00 https://next-auth.js.org/errors#no_secret Please define a
secret
in production. MissingSecret [MissingSecretError]: Please define asecret
in production. 2023-07-14T14:24:50.270-06:00 at assertConfig (/var/task/.next/server/chunks/294.js:6938:16) 2023-07-14T14:24:50.270-06:00 at AuthHandler (/var/task/.next/server/chunks/294.js:6480:54) 2023-07-14T14:24:50.270-06:00 at processTicksAndRejections (node:internal/process/task_queues:96:5) 2023-07-14T14:24:50.270-06:00 at async NextAuthRouteHandler (/var/task/.next/server/chunks/294.js:9662:30) 2023-07-14T14:24:50.270-06:00 at async NextAuth._args$ (/var/task/.next/server/chunks/294.js:9696:24) 2023-07-14T14:24:50.270-06:00 at async /var/task/.next/server/chunks/981.js:2702:37 { 2023-07-14T14:24:50.270-06:00 code: 'NO_SECRET' 2023-07-14T14:24:50.270-06:00 } 2023-07-14T14:24:50.319-06:00 REPORT RequestId: 682f871d-4492-43c8-8b2f-9479064951e7 Duration: 2096.26 ms Billed Duration: 20