#How to change redirect path for unauthenticated users

4 messages · Page 1 of 1 (latest)

glossy verge
#

I am using the new Laravel 12 Inertia w/ React starter kit. When the session timout, I am brought to a screen as shown in the attached screenshot. How can I change it so that the user is redirected to the /login page instead?

#

I have looked in the session config and the handleinertiarequest middleware and there seems to no settings to change for the redirect path.

#

Upon further testing, this screen shows up if I try to go to access any route that has the auth middleware as an unauthenticated user. So now my question is, how can I redirect the user to /login via the auth middleware?

glossy verge
#

How to change redirect path for unauthenticated users