I am very new to Laravel. I tried Laravel fortify to make login-registration. But I don't know how long Laravel keep remember this login. Is there a way I can set the duration of remember?
My login form has a checkbox with name="remember".
<div class="mb-3 form-check">
<input type="checkbox" name="remember" class="form-check-input" id="remember">
<label class="form-check-label" for="remember">Remember Me</label>
</div>
I have set expire_on_close to true in config/session.php
'expire_on_close' => true,
CodePudding user response:
There is no time limit or specific duration. If you implement "remember me" functionality, Laravel will remember the login until you manually log out.
It is not fortify but Laravel's Authentication functionality. It doesn't save "remember me" information in session, but in a remember_token column on users table in database
From the Laravel documentation:
If you would like to provide "remember me" functionality in your application, you may pass a boolean value as the second argument to the attempt method. When this value is true, Laravel will keep the user authenticated indefinitely or until they manually logout.
