]> BookStack Code Mirror - bookstack/blobdiff - app/Access/Saml2Service.php
Auth: Refactored OIDC RP-logout PR code, Extracted logout
[bookstack] / app / Access / Saml2Service.php
index 7f599762e13d08cc3805c007b9be375465886db6..e7627f7e4c2d8a9ce4cedd5cbac357ba9b67420b 100644 (file)
@@ -71,8 +71,7 @@ class Saml2Service
                 throw $error;
             }
 
-            $this->actionLogout();
-            $url = '/';
+            $url = $this->loginService->logout();
             $id = null;
         }
 
@@ -140,20 +139,11 @@ class Saml2Service
             );
         }
 
-        $this->actionLogout();
+        $this->loginService->logout();
 
         return $redirect;
     }
 
-    /**
-     * Do the required actions to log a user out.
-     */
-    protected function actionLogout()
-    {
-        auth()->logout();
-        session()->invalidate();
-    }
-
     /**
      * Get the metadata for this service provider.
      *