ollieread / multiauth

Laravel multi auth
441 stars 109 forks source link

Login Ajax Problems #95

Closed ThunderPaul closed 9 years ago

ThunderPaul commented 9 years ago

Hello, performing a login using an Ajax call I found a problem in the call of Fuzion login "attempt" such as "user::Auth()->attempt($ userData)".

Without using Ajax or by calling other function as "check()" or "guest()" works perfectly.

mrmaddotta commented 9 years ago

Hi There

Also having the same problem

$credentials = array(
    'email'     => Input::get('email'),
    'password'  => Input::get('password'),
);

$auth = Auth::user()->attempt($credentials);
return Response::json(array('status' => $auth));

returns true but then checking the auth status after with

Auth::user()->check()

returns false.

ollieread commented 9 years ago

That sounds like more of a session issue that an issue with multiauth. All I do is provide multiple ways into the Auth system, so if this was a bug, it'd be a bug with default Auth too.