BookStack\Http\Controllers\Auth\RegisterController::socialCallback PHP Method

socialCallback() public method

The callback for social login services.
public socialCallback ( $socialDriver ) : Illuminate\Http\RedirectResponse | Redirector
$socialDriver
return Illuminate\Http\RedirectResponse | Illuminate\Routing\Redirector
    public function socialCallback($socialDriver)
    {
        if (session()->has('social-callback')) {
            $action = session()->pull('social-callback');
            if ($action == 'login') {
                return $this->socialAuthService->handleLoginCallback($socialDriver);
            } elseif ($action == 'register') {
                return $this->socialRegisterCallback($socialDriver);
            }
        } else {
            throw new SocialSignInException('No action defined', '/login');
        }
        return redirect()->back();
    }