diff --git a/src/Controllers/OAuthController.php b/src/Controllers/OAuthController.php index 94d454f..1c81fbf 100644 --- a/src/Controllers/OAuthController.php +++ b/src/Controllers/OAuthController.php @@ -111,7 +111,7 @@ public function callBack(): RedirectResponse $users->addToDefaultGroup($user); } - if ($this->userExist->isBanned()) { + if ($this->userExist && $this->userExist->isBanned()) { return redirect()->to(config('Auth')->logoutRedirect())->with('error', $this->userExist->getBanMessage() ?? lang('Auth.bannedUser')); }