Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel Remember Me functionality

Tags:

php

laravel

please someone guide me with the laravel remember me functionality.! how does laravel Remember me Token works.? 1. Is it used to save the username and password so (If remember me is Clicked) and the user logouts of the application when the user comes back after certain amount of time his username and password fields will be save in the form. Example Facebook. 2. Or Remember me just forces the user to be logged in for certain amount of time and if the user logouts everything is clear..! other wise it will keep the user logged in for the specific time we specified.

like image 709
Touseef Avatar asked Jan 25 '26 15:01

Touseef


1 Answers

The remember-me cookie contains the user's ID, a random token (which is stored in the users table), and the user's hashed password. If present and valid, the user doesn't need to log in; they are deemed already authenticated.

It is set as a cookie with the forever expiration, which, despite the name, Laravel defines as five years. If a user logs out, their remember token is changed so the old cookie is no longer valid.

No pre-filling of the login form occurs.

like image 61
ceejayoz Avatar answered Jan 28 '26 04:01

ceejayoz