ollieread / multiauth

Laravel multi auth
441 stars 109 forks source link

Problems on logout #73

Closed jammersonf closed 9 years ago

jammersonf commented 9 years ago

I'm having trouble logout user.

I try to use Auth::logout(); or Auth::coach()->logout(). it passes through the code but still logged User

(Sorry for bad english)

jammersonf commented 9 years ago

could repair.

thanks!

chhumsina commented 9 years ago

Hi @jammersonf I have faced this problem. Could you guide me this tip? Thanks you.

jammersonf commented 9 years ago

I don't remember what was happening exactly, this way is solved. Also check the routes and filters.

public function getLogout()
{
    Auth::coach()->logout();
    Auth::user()->logout();
    Session::flush();
    return Redirect::to('/login');
}
chhumsina commented 9 years ago

Thanks you so much :)