Need help getting NextAuth working #1721
-
Your question I need help getting NextAuth to work. What are you trying to do I am working on a minimal viable NextAuth Sample App for myself in order to learn how NextAuth works. I'm trying to get it working out of the box so-to-speak. I have copied code from the Example Repo. I'm running into this error (screenshot included below copy/paste of error): Unhandled Runtime Error Source 187 | var providers = yield getProviders();
I figure I'm missing one file somewhere or a line of code I overlooked, and I need help finding what I'm missing. Reproduction In addition to the reproduction repo, I am using the following .env file. All credentials that are snipped from here have been confirmed to be correct:
My database of choice is MongoDB. Feedback
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
@brilang You need to move your |
Beta Was this translation helpful? Give feedback.
@brilang You need to move your
[...nextauth].js
inside of anauth
folder under theapi
folder. The complete path to the file should beapi/auth/[...nextauth].js
. As an aside, you should remove any providers you won't need from the [...nextauth].js file.