Auth is not Working at all
Closed this issue · 2 comments
I have been fighting with this for days, and I am sure i have filled out my .env.local with the needed information. But i keep getting this:
"```
Object { name: "Auth Error", message: "EmailSignin" }
message: "EmailSignin"
name: "Auth Error"
: Object { … }
defineGetter: function defineGetter()
defineSetter: function defineSetter()
lookupGetter: function lookupGetter()
lookupSetter: function lookupSetter()
proto:
constructor: function Object()
hasOwnProperty: function hasOwnProperty()
isPrototypeOf: function isPrototypeOf()
propertyIsEnumerable: function propertyIsEnumerable()
toLocaleString: function toLocaleString()
toString: function toString()
valueOf: function valueOf()
<get proto()>: function proto()
<set proto()>: function proto()
error.ts:19:12
Object { name: "Auth Error", message: "EmailSignin" }
message: "EmailSignin"
name: "Auth Error"
: Object { … }
defineGetter: function defineGetter()
defineSetter: function defineSetter()
lookupGetter: function lookupGetter()
lookupSetter: function lookupSetter()
proto:
constructor: function Object()
hasOwnProperty: function hasOwnProperty()
isPrototypeOf: function isPrototypeOf()
propertyIsEnumerable: function propertyIsEnumerable()
toLocaleString: function toLocaleString()
toString: function toString()
valueOf: function valueOf()
<get proto()>: function proto()
<set proto()>: function proto()
error.ts:19:12
Uncaught (in promise)
Object { name: "Auth Error", message: "EmailSignin" }
message: "EmailSignin"
name: "Auth Error"
: Object { … }
index.esm.mjs:2147
handleSubmit index.esm.mjs:2147
AsyncFunctionThrow self-hosted:804
(Async: async)
callCallback react-dom.development.js:20565
invokeGuardedCallbackImpl react-dom.development.js:20614
invokeGuardedCallback react-dom.development.js:20689
invokeGuardedCallbackAndCatchFirstError react-dom.development.js:20703
executeDispatch react-dom.development.js:32128
processDispatchQueueItemsInOrder react-dom.development.js:32160
processDispatchQueue react-dom.development.js:32173
dispatchEventsForPlugins react-dom.development.js:32184
dispatchEventForPluginEventSystem react-dom.development.js:32374
batchedUpdates$1 react-dom.development.js:24953
batchedUpdates react-dom.development.js:28844
dispatchEventForPluginEventSystem react-dom.development.js:32373
dispatchEvent react-dom.development.js:30141
dispatchDiscreteEvent react-dom.development.js:30112
(Async: EventListener.handleEvent)
addEventBubbleListener react-dom.development.js:30361
addTrappedEventListener react-dom.development.js:32277
listenToNativeEvent react-dom.development.js:32216
listenToAllSupportedEvents react-dom.development.js:32227
forEach self-hosted:4281
listenToAllSupportedEvents react-dom.development.js:32222
hydrateRoot$1 react-dom.development.js:37940
hydrateRoot react-dom.development.js:38526
hydrateRoot client.js:20
hydrate app-index.tsx:245
startTransition react.development.js:2596
hydrate app-index.tsx:244
app-next-dev.ts:8
appBootstrap app-bootstrap.ts:61
loadScriptsInSequence app-bootstrap.ts:20
appBootstrap app-bootstrap.ts:60
app-next-dev.ts:6
NextJS 7
I know I am knew to programming but I really need help to get the authentication working, to be able to access the dasboard. From my debugging work I concluded the next/auth SignIn and SignOut are the problem, or maybe the way my environment variables are handled or the auth/auth.ts but that seems right. By deafult the authentication is not working at all. Help me I really like this boilerplate.
Also, after reading the auth.js documentation, the auth.ts is supposed to be under src not lib/API/services/auth/auth.ts. do you think this is the issue? although i see that "src/app/api/auth/[...nextauth]/route.ts" is configured to work with the one in "ib/API/services/auth/auth.ts". Please let me know. I'm guessing this is working for everybody else, so, I am assuming I did something wrong in my .env.local