dwinjnr / laravel-multi-auth

Multiple Authentication in Laravel 5.6 (Admin and User)
MIT License
12 stars 7 forks source link

logout will sign out all guards #2

Open michaelnguyen2021 opened 5 years ago

michaelnguyen2021 commented 5 years ago

if you have user and admin both logged in. When 1 of them sign out, all are signed out. It should only sign out the guard that perform the sign out

dwinjnr commented 5 years ago

if you have user and admin both logged in. When 1 of them sign out, all are signed out. It should only sign out the guard that perform the sign out

I just tried it. It doesn't sign out all logged users. Laravel logs out the specific guard.

public function logout(Request $request) { $this->guard()->logout(); $request->session()->invalidate(); return redirect('/'); }