Next auth not working and I don't know where's the problem
Unanswered
Lionhead posted this in #help-forum
LionheadOP
I have a problem with Next Auth, I've read all the documentation, tutorial, view YouTube videos and my implementation es like them, but in my code don't working.
I tryed multiples ways but I can't discover why dont working.
Can someone take a look to my code?
https://www.openbin.dev/pastes/2ef26030-da78-4bf9-88d6-61474992bf87
I tryed multiples ways but I can't discover why dont working.
Can someone take a look to my code?
https://www.openbin.dev/pastes/2ef26030-da78-4bf9-88d6-61474992bf87
4 Replies
@Lionhead I have a problem with Next Auth, I've read all the documentation, tutorial, view YouTube videos and my implementation es like them, but in my code don't working.
I tryed multiples ways but I can't discover why dont working.
Can someone take a look to my code?
https://www.openbin.dev/pastes/2ef26030-da78-4bf9-88d6-61474992bf87
I think the problem is here
if (res.status === 200) {
localStorage.setItem('token', user.token);
}@Ray I think the problem is here
ts
if (res.status === 200) {
localStorage.setItem('token', user.token);
}
LionheadOP
I deleted but it still don't working
@Lionhead I deleted but it still don't working
any error message?
@Ray any error message?
LionheadOP
No, no message.
Whether I insert the wrong or correct credentials it stays in the '/' path, reloading the page.
I inserted a console log after the e.preventDefault and it goes into the handleSubmit.
Whether I insert the wrong or correct credentials it stays in the '/' path, reloading the page.
I inserted a console log after the e.preventDefault and it goes into the handleSubmit.