next-auth redirecting to the same page over and over again
Hello, I am using next-auth, i have a custom login page and i have a dashboard page that is a protected route so you need to be authenticated in order to see it, when i try to access it it redirects me to the custom login page, so far so good, but when i enter the right username and password it redirects me to, the login form again?? and that happens in a loop.
Here is my code.
api/auth/[...nextauth]/options.ts
api/auth/[...nextauth]/route.ts
/login.tsx
Help!!
1 Reply
I solved this guys
how can i mark this as solved?
ok i did it
thanks anyway guys :)