]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/Auth/SocialController.php
Added OIDC group sync functionality
[bookstack] / app / Http / Controllers / Auth / SocialController.php
index dd567fe18b13843cce2ee97f0c342191199458da..1691668a2bbc37163553167e3f20d0502c6af3cb 100644 (file)
@@ -27,8 +27,7 @@ class SocialController extends Controller
         SocialAuthService $socialAuthService,
         RegistrationService $registrationService,
         LoginService $loginService
-    )
-    {
+    ) {
         $this->middleware('guest')->only(['getRegister', 'postRegister']);
         $this->socialAuthService = $socialAuthService;
         $this->registrationService = $registrationService;
@@ -140,9 +139,9 @@ class SocialController extends Controller
         }
 
         $user = $this->registrationService->registerUser($userData, $socialAccount, $emailVerified);
+        $this->showSuccessNotification(trans('auth.register_success'));
         $this->loginService->login($user, $socialDriver);
 
-        $this->showSuccessNotification(trans('auth.register_success'));
         return redirect('/');
     }
 }