From d13c9ae11cd8e21d2fe26f3884884b72a61489f2 Mon Sep 17 00:00:00 2001 From: Pietro Saccardi <lizardm4@gmail.com> Date: Mon, 20 Mar 2023 17:30:40 +0100 Subject: [PATCH] Handle the state parameter in callback URL. This fixes login with certain providers, e.g. Authentik, that trigger the message "OAuth: State not found in session, are you sure you stored it?" This closes #6. --- Generic.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Generic.php b/Generic.php index 706bdda..6b1e342 100644 --- a/Generic.php +++ b/Generic.php @@ -10,6 +10,10 @@ use OAuth\Common\Http\Uri\Uri; */ class Generic extends AbstractOAuth2Base { + /** @inheritdoc */ + public function needsStateParameterInAuthUrl() { + return true; + } /** @inheritdoc */ public function getAuthorizationEndpoint() -- GitLab