laravel remember me not working in chrome work in firefox

笑着哭i 提交于 2019-12-11 09:57:14

问题


As I mentioned in my post in my Laravel 4.1 application I have the "Remember me" option.

When I connect in chrome with "Remember me" checked and close the browser and open it, it's working, even when I don't check it!

But with Firefox it work perfectly. When I check "Remember me", close then open the browser I'm still connected.

When I don't check it and connect, close then open the browser it return me to the login form with error message.

I don't understand why it's not working in chrome.

 else if (Auth::attempt($credentials, $remember)) {

     return Redirect::intended('/');
 }

回答1:


It's because, probably Chrome is still running in the background after you've closed the browser. Try to disable Continue running background apps when Google Chrome is closed feature, follow these steps:

  • Open chrome://settings
  • Click Show advanced settings
  • Go to to System section (downward) and disable Continue running background apps when Google Chrome is closed. This will force the Chrome browser to close completely and then it'll delete the session cookies as well.

This is a common problem using Chrome and I've faced it before and solved it right this way.



来源:https://stackoverflow.com/questions/25627194/laravel-remember-me-not-working-in-chrome-work-in-firefox

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!