]> _ Git - cubist_socialite.git/commitdiff
wip #4765
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 11 Oct 2021 09:13:40 +0000 (11:13 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 11 Oct 2021 09:13:40 +0000 (11:13 +0200)
composer.lock
src/Http/Controllers/SocialiteController.php

index 9aa864a07ca99cae0f64e10cea8edeafcab92f3a..26b0a27788959939dce1e8c5fd97783888975053 100644 (file)
         },
         {
             "name": "ramsey/collection",
-            "version": "1.2.1",
+            "version": "1.2.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/ramsey/collection.git",
-                "reference": "eaca1dc1054ddd10cbd83c1461907bee6fb528fa"
+                "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/ramsey/collection/zipball/eaca1dc1054ddd10cbd83c1461907bee6fb528fa",
-                "reference": "eaca1dc1054ddd10cbd83c1461907bee6fb528fa",
+                "url": "https://api.github.com/repos/ramsey/collection/zipball/cccc74ee5e328031b15640b51056ee8d3bb66c0a",
+                "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a",
                 "shasum": ""
             },
             "require": {
             ],
             "support": {
                 "issues": "https://github.com/ramsey/collection/issues",
-                "source": "https://github.com/ramsey/collection/tree/1.2.1"
+                "source": "https://github.com/ramsey/collection/tree/1.2.2"
             },
             "funding": [
                 {
                     "type": "tidelift"
                 }
             ],
-            "time": "2021-08-06T03:41:06+00:00"
+            "time": "2021-10-10T03:01:02+00:00"
         },
         {
             "name": "ramsey/uuid",
index fd8c4dc34ed44a37a41d327981f41c23fe288999..eed3f91e78deb5c90c3dd59c7c5279efae6d8a90 100644 (file)
@@ -30,11 +30,15 @@ class SocialiteController extends Controller
     {
         $provider = request()->provider;
         if (in_array($provider, $this->providers, true)) {
-            $user = Socialite::driver($provider)->user();
-            $authUser = $this->findOrCreateUser($user, $provider);
+            try {
+                $user = Socialite::driver($provider)->user();
+                $authUser = $this->findOrCreateUser($user, $provider);
 
-            Auth::login($authUser, true);
-            return redirect('/test');
+                Auth::login($authUser, true);
+                return redirect('/test');
+            } catch (\Exception $e) {
+                $this->redirect();
+            }
         }
     }