From 725ef9688db901ba30859c71674e95554cdfd573 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Fri, 8 Oct 2021 18:02:41 +0200 Subject: [PATCH] wip #4765 --- src/CubistSocialiteAuthServiceProvider.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/CubistSocialiteAuthServiceProvider.php b/src/CubistSocialiteAuthServiceProvider.php index 7db11d9..df932d3 100644 --- a/src/CubistSocialiteAuthServiceProvider.php +++ b/src/CubistSocialiteAuthServiceProvider.php @@ -19,8 +19,12 @@ class CubistSocialiteAuthServiceProvider extends AuthServiceProvider $this->registerPolicies(); Auth::viaRequest('socialitegoogle', function (Request $request) { - $user = User::fromProvider('google'); - dd('2', $user); + try { + $user = User::fromProvider('google'); + return $user; + } catch (\Exception $e) { + return null; + } }); } } \ No newline at end of file -- 2.39.5