0

I am performing the function of remember user login in the browser, I use the default Authentication of laravel, after "remember me checkbox" checked in the login form it will generate remember tokens in the database, but when I turned off the browser and reopened the user information that was not available in the login form. I turned off autocomplete (username,password inputs) in the inputs, because chrome automatically remembers lots of login accounts, I just want it to remember which account logged in and tick checkbox remember.

// Default laravel attemptLogin
protected function attemptLogin(Request $request)
{
    return $this->guard()->attempt(
        $this->credentials($request), $request->filled('remember')
    );
}

// Input
<input type="checkbox" name="remember"> Remember me</label>
colinmorgan
  • 55
  • 1
  • 6
  • You get it wrong remember option is not use to fill the user credentials in browser. By default user login for about 2 hours after two hours on inactivity login session expires. But if you checked remember me option you will be able login from remember me cookie no need to login again. Read: https://laravel.com/docs/5.8/authentication – Zohaib Sep 08 '19 at 19:22
  • haha, thanks for your answer, i got it – colinmorgan Sep 09 '19 at 01:16

0 Answers0