Php Laravel登录在edge和internet explorer中不起作用
使用Laravel 5登录不能使用Edge和Internet Explorer,而在其他浏览器中工作得非常好 我们怀疑这与会话未正确存储有关,但老实说,我们不知道是什么导致了这个问题 当我们使用适当的详细信息登录时,登录逻辑被触发并正确完成,但在此之后,它只是重定向回登录页面,因此很可能中间件认为用户没有登录,并将其返回到登录页面,这就是为什么我们认为is与会话有关 这是我们的登录脚本:Php Laravel登录在edge和internet explorer中不起作用,php,internet-explorer,laravel-5,login,microsoft-edge,Php,Internet Explorer,Laravel 5,Login,Microsoft Edge,使用Laravel 5登录不能使用Edge和Internet Explorer,而在其他浏览器中工作得非常好 我们怀疑这与会话未正确存储有关,但老实说,我们不知道是什么导致了这个问题 当我们使用适当的详细信息登录时,登录逻辑被触发并正确完成,但在此之后,它只是重定向回登录页面,因此很可能中间件认为用户没有登录,并将其返回到登录页面,这就是为什么我们认为is与会话有关 这是我们的登录脚本: $rules = array('email' => 'required|email|min:3
$rules = array('email' => 'required|email|min:3|max:60',
'password' => 'required|min:6|max:20');
$attributeNames = array(
'email' => strtolower(Lang::get('auth.email')),
'password' => strtolower(Lang::get('auth.password')),
);
$validator = Validator::make(Input::all(), $rules);
$validator->setAttributeNames($attributeNames);
if ($validator->fails()){ return Redirect::back()->withErrors($validator); die(); }
//Make an login attempt
$auth = Auth::attempt(array(
'email' => Input::get('email'),
'password' => Input::get('password'),
'role' => 'admin'
), false);
if(!$auth){
$auth2 = Auth::attempt(array(
'email' => Input::get('email'),
'password' => Input::get('password'),
'role' => 'user'
), false);
if(!$auth2){
return Redirect::back()->withErrors(Lang::get('auth.errorText'))->withInput(Input::all());
die();
}
}
//If user is not activated
if(Auth::User()->activated != 'OK'){
Auth::logout();
return Redirect::back()->withErrors(Lang::get('auth.notActivated'));
die();
}
if(Auth::User()->sms_verificatie == '1') {
$user = Auth::User();
$user->sms_ok = 0;
$user->save();
$sms_codes_verwijderen = UsersSMSLogin::where('id_cms_users','=',Auth::User()->id)->delete();
return Redirect::route('sms-verificatie');
die();
}
Session::forget('dashboard_werkgever');
return Redirect::route('dashboard');
这个问题似乎与Google Analytics有关,我们删除了Edge和internet exploder中的分析脚本,现在一切都正常了…更改cookie名称以删除对我有用的(下划线) 在
app/config/session.php中
已更改
“cookie”=>“laravel\u会话”
到
“cookie”=>“laravelsession”
为了以防万一,我最近遇到了一个非常类似的问题。事实证明,我在同一个域上有两个web应用程序共享同一个会话cookie名称,而有些浏览器发送了正确的cookie(我想这完全是运气使然),IE没有
从中吸取教训?始终更改默认的laravel\u会话
cookie名称:)
这篇文章证明很有用。。。
您的错误/问题是什么?这将有助于更好地理解到底发生了什么。这是有趣的部分,浏览器似乎只是重新加载登录页面,而我们确保登录逻辑被执行!看一看。也许会发光你救了我一天!也为我工作!谢谢