redirect with intercepted route results in infinite loop
Unanswered
Short-eared Owl posted this in #help-forum
Short-eared OwlOP
For my application, I cannot use middleware for protecting routes, so I've opted to just do it on the few pages that need protection.
In my application, I have a
However, in a page that I need to proect, if I simply
It makes it so that I essentially can't protect routes this way. Is there any way to either avoid the redirect loop, or just make it hard navigate to the
In my application, I have a
/login page, as well as @auth/(.login) to intercept on client navigations, so that its just a modal. It works great so far.However, in a page that I need to proect, if I simply
redirect('/login') if a user was not found with the request, it performs a client side navigation (which is cool and all), but it keeps spamming the redirect call, infinitely, until login is complete, or the user exists the modal, in which case, they get sent to the root page.It makes it so that I essentially can't protect routes this way. Is there any way to either avoid the redirect loop, or just make it hard navigate to the
/login page?