I am following the Add Login to Your Next.js Application instructions, and get stuck at step 4: Add the dynamic Route Handler as I keep getting the following error when testing route.js
:
throw new TypeError(error.details[0].message);
^
TypeError: "secret" is required
Here is my directory structure:
project_root_directory/.env.local
project_root_directory/src/pages/api/auth/[auth0]/route.js
)
I test it by adding:
console.log("the AUTH0_SECRET env var is set: ", !!process.env.AUTH0_SECRET);
which always returns:
the AUTH0_SECRET env var is set: false
I would love some insights on what I am doing wrong.
Thank you!
PS I tried to add links and got the following message :
“An error occurred: Sorry, new users can’t put links in posts.”