]> _ Git - cubist_socialite.git/commitdiff
wip #4765
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 8 Oct 2021 16:02:41 +0000 (18:02 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 8 Oct 2021 16:02:41 +0000 (18:02 +0200)
src/CubistSocialiteAuthServiceProvider.php

index 7db11d96c5d815643d70d17e88a21699ef86cc18..df932d34701353b8304c3cf09cd38069eadd3a1f 100644 (file)
@@ -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