Replies: 1 comment
-
it turns out we had some hackish redirect logic dealing with issues from an older version. that was causing the unexpected behavior. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have not been able to solve this. Whatever is in the callbackUrl is getting hit with a ?_rsc= request resulting in infinite recursive redirects. Unlike a prior version of this issue, this happens in prod build as well as dev environment. Everything works fine so long as I navigate directly to the login page, but if I go to a different page without being authenticated and I get redirected to the login page with a callbackUrl set in the query string, then an infinite loop of redirects begins. I hadn't realized it was happening, only can tell if you look at the network tab, but when I recently implemented middleware logging I discovered this.
What's worse is it's stripping the _rsc portion off of the request so I can't even detect it or match it! It really seems like a bug that nobody has noticed because it's invisible unless you are looking closely. Next/nextauth shouldn't be prefetching pages if it's not authenticated yet!
Beta Was this translation helpful? Give feedback.
All reactions