Next-Auth with credentials returns always 401 #5385
Unanswered
fred-10git
asked this question in
Help
Replies: 1 comment 1 reply
-
One thing I noticed is in your
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to add authentication on my Next.JS (localhost:3000) app with credentials from a Strapi API (localhost:2337) with NextAuth.js (each app is on a docker container).
First of all, i've written a common signIn function :
I made a test page on my next.js app, and it's working, i can get my strapi user through this function without error.
But that's not working while trying the next-auth login with credentials.
My [..nextauth.js] file :
But when I try to login (from a custom login page or through the generated page http://localhost:3000/api/auth/signin), I always got a 401 unauthorized exception in my signInWithCredentials function
If someone could explain what i'm missing ...
Beta Was this translation helpful? Give feedback.
All reactions