From 613a1c2e790333ee599616b720b0eccd45ceb5c6 Mon Sep 17 00:00:00 2001 From: Josh Crawford Date: Tue, 27 Aug 2024 21:06:35 +1000 Subject: [PATCH 1/2] 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); } From f3312b861379cce09de57ff02ba3b53beb22b7a4 Mon Sep 17 00:00:00 2001 From: Josh Crawford Date: Tue, 27 Aug 2024 21:07:18 +1000 Subject: [PATCH 2/2] version 1.0.31 --- CHANGELOG.md | 5 +++++ composer.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4356315..ab93f65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 1.0.31 - 2024-08-27 + +### Fixed +- Add conditional for Twitter `code_verifier` check to prevent errors when already supplied. + ## 1.0.30 - 2024-08-09 ### Fixed diff --git a/composer.json b/composer.json index fcbd680..c4bdfbf 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "verbb/auth", "description": "A Craft CMS module to make working with authentication for third-parties a breeze.", - "version": "1.0.30", + "version": "1.0.31", "support": { "email": "support@verbb.io", "issues": "https://github.com/verbb/auth/issues?state=open",