Logging in with Laravel 5 does not work with Edge and Internet Explorer, works fine in other browsers.
We suspect this is due to the fact that the sessions are not properly stored, but honestly, we do not know what causes this problem.
When we log into the system with the correct data, the logon logic starts and ends properly, but after that it is simply redirected back to the login page, so it is likely that the middleware considers that the user is not logged in and returns them to the login page, so we think this is related to the sessions.
This is our login script:
$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');
internet-explorer microsoft-edge php login laravel-5
Moles
source share