You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to restrict access to /login and /signup pages when a user is already logged in. So, I created a middleware within I checked if the user is logged in. If it's the case I want to redirect him back. Hence, I used response.redirect().back() but it does not work. Actually, I'm always redirected to the home page no matter where I was before the request.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm trying to restrict access to /login and /signup pages when a user is already logged in. So, I created a middleware within I checked if the user is logged in. If it's the case I want to redirect him back. Hence, I used response.redirect().back() but it does not work. Actually, I'm always redirected to the home page no matter where I was before the request.
Beta Was this translation helpful? Give feedback.
All reactions