H
H
honormgr2017-01-05 02:24:28
Laravel
honormgr, 2017-01-05 02:24:28

Laravel 5 authentication error?

Hello!
Who got into such an error when working with Socialite Providest (Not pure socialite, but Socialite Providers).
Used vk.
This error has not been observed until today:
Argument 1 passed to Illuminate\Auth\SessionGuard::login() must implement interface Illuminate\Contracts\Auth\Authenticatable, null given, called in D:\openserver\domains\make.ru\vendor \laravel\framework\src\Illuminate\Auth\AuthManager.php on line 294 and defined

public function callback(SocialAccountService $service, $provider)
    {

        $driver   = Socialite::driver($provider);
        $user = $service->createOrGetUser($driver, $provider);
        \Auth::login($user, true);
        return redirect()->intended('/');

    }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AnjeyTsibylskij, 2017-01-05
@honormgr

As you can see from the code, the error is most likely in the drain
. the called method does not satisfy the interface. Consequently, the $user variable does not get what the login method expects. I think you need to dig in this direction.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question