From 75942add7dd1e7e8c68e8a8a6e10409de3f24dfb Mon Sep 17 00:00:00 2001 From: Josh Crawford Date: Fri, 5 Apr 2024 00:43:26 +1100 Subject: [PATCH] Add improved session-handling for authorization and callback methods, to improve failed sessions in some cases --- src/controllers/AuthController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/controllers/AuthController.php b/src/controllers/AuthController.php index 9b52f23..269a431 100644 --- a/src/controllers/AuthController.php +++ b/src/controllers/AuthController.php @@ -61,6 +61,9 @@ public function actionConnect(): ?Response public function actionCallback(): ?Response { + // Restore the session data that we saved before authorization redirection from the cache back to session + Session::restoreSession($this->request->getParam('state')); + // Get both the origin (failure) and redirect (success) URLs $origin = Session::get('origin'); $redirect = Session::get('redirect');