Hesto/multi-auth

Call to a member function getAuthIdentifier() on null

Opened this issue · 5 comments

I'm trying to log out, but it's failing. What is the problem?

indir

I am having the same issue

same here, still not solve ?

My fix :
in each LoginController (AdminAuth, ModeratorAuth, UserAuth)
i overrited the logout function like this:

public function logout() {
auth('admin')->logout();
return redirect('admin/login');
}

auth()->logout does the trick for me, hope it helps

Engineer Safaetul Ahasan
I have face same problem
Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR)
Call to a member function getAuthIdentifier() on null

My solution is rewrite the function logout in LoginController:
public function logout() {
Auth::guard('administrateur')->logout();
return redirect('administrateur/login');
}