Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

joenyambura's avatar

Issues with "Remember Me" Functionality and Redirect After Login Using Jetstream and Livewire in Laravel 11

I'm experiencing an issue with the "Remember Me" functionality in a Laravel 11 application using Jetstream with Livewire. Although the session lifetime is set to expire after 2 hours, and both the remember me cookie is correctly set in the browser, and the database column for the remember me token is populated, I still have to log in again after the session expires. This occurs despite having checked the "Remember Me" option during login. How can I ensure that the "Remember Me" feature works correctly, keeping users logged in beyond the session expiry?

Also fter logging in, I am redirected to the / route instead of the custom route specified in the Fortify 'home' configuration. How can ensure that the post-login redirection respects my custom configuration?

0 likes
2 replies
Snapey's avatar

For the last point, the "intended" route will always take precedence over the 'home' configuration.

eg, user refreshes page /xyz if this route is protected by auth middleware the user will see the login page. After logging in they will be returned to the /xyz route as that was where they intended to visit.

keeping users logged in beyond the session expiry

Just note a distinction here. They are not kept logged in, rather the login happens silently in the background using the remember me token and a cookie from the client. During your testing you don't delete cookies do you?

joenyambura's avatar

@Snapey I'm not deleting the cookies, I've tested on my production and development server, Mobile phone and sessions are not persistent after time set in session lifetime.

Please or to participate in this conversation.