I don't think this is a bug as I have this working in another project. I basically copied all the settings from that project to this one but I can NOT get the /login page to redirect to the /admin page. What I'm trying to have happen is if you go to /admin it redirects you to /login if you are not logged in, and once you do login it redirects you back to /admin.
When I login, the authentication goes through fine. /api/user gets called and that returns the user object exactly as expected. But it just stays on the /login page. And if I try putting in /admin into the URL it just redirects me back to the /login page.
Here's the repo. If you clone this and run it, you should see what I'm talking about. I setup the API so any username and password will work.
https://github.com/joshrouwhorst/NuxtAuthIssue
I'm somewhat new to Nuxt so maybe there is a troubleshooting step I'm unaware of. I appreciate any help!
Turns out the slightly more recent version of @nuxtjs/auth-next (5.0.0-1608568767.2fe2217) isn't working. I switched to the version in my working project (5.0.0-1607967355.df8f01e) and that works.
Most helpful comment
Turns out the slightly more recent version of @nuxtjs/auth-next (5.0.0-1608568767.2fe2217) isn't working. I switched to the version in my working project (5.0.0-1607967355.df8f01e) and that works.