From 613a1c2e790333ee599616b720b0eccd45ceb5c6 Mon Sep 17 00:00:00 2001 From: Josh Crawford Date: Tue, 27 Aug 2024 21:06:35 +1000 Subject: [PATCH] Add conditional for Twitter `code_verifier` check --- src/providers/Twitter.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/providers/Twitter.php b/src/providers/Twitter.php index fa09bea..6312ea3 100644 --- a/src/providers/Twitter.php +++ b/src/providers/Twitter.php @@ -41,7 +41,9 @@ protected function getAuthorizationQuery(array $params): string protected function getAccessTokenRequest(array $params): RequestInterface { // Apply PKCE token - $params['code_verifier'] = Session::get('oauth2verifier'); + if (!isset($params['code_verifier'])) { + $params['code_verifier'] = Session::get('oauth2verifier'); + } return parent::getAccessTokenRequest($params); }