Replies: 1 comment
-
Hey! 👋 I ran into the same issue before and managed to solve it. Here's a more complete example that might help you understand how to handle redirecting unauthenticated users back to the route they tried to access after logging in. ✅ Solution:You need to pass the original URL (e.g., Then, after successful login, just read 🗂️ Folder structure:
🔒 In your protected route (
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
hi,enyone can help me ? i am reding documention many times but cant find the answer
an unauthenticated user tries to access a protected route, for example, /post/1?page=1
since they are not logged in, they are redirected to: /login.
my question is: after they successfully log in, how can I redirect them back to the original route: /post/1?page=1?
I tried following the documentation:
but I encountered an error: 'search' object does not have a 'redirect' property
Beta Was this translation helpful? Give feedback.
All reactions