From 71726f919b63db7d4b3ca7c008ed485e8f35b8ed Mon Sep 17 00:00:00 2001 From: taylorotwell <463230+taylorotwell@users.noreply.github.com> Date: Tue, 1 Apr 2025 14:59:26 +0000 Subject: [PATCH 1/4] Update CHANGELOG --- CHANGELOG.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d8c503c..bccabad0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Release Notes -## [Unreleased](https://github.com/laravel/socialite/compare/v5.18.0...5.x) +## [Unreleased](https://github.com/laravel/socialite/compare/v5.19.0...5.x) + +## [v5.19.0](https://github.com/laravel/socialite/compare/v5.18.0...v5.19.0) - 2025-03-27 + +* docs: sync readme with recent adapters by [@iBotPeaches](https://github.com/iBotPeaches) in https://github.com/laravel/socialite/pull/735 +* [5.x] Throw exception if config is incomplete by [@mateusjatenee](https://github.com/mateusjatenee) in https://github.com/laravel/socialite/pull/736 +* Supports PHPStan 1.12 by [@crynobone](https://github.com/crynobone) in https://github.com/laravel/socialite/pull/739 ## [v5.18.0](https://github.com/laravel/socialite/compare/v5.17.1...v5.18.0) - 2025-02-11 From 0a8502865b39826e187ec40aa0d6ecf5d7bc422e Mon Sep 17 00:00:00 2001 From: David Hill <1879069+iamdavidhill@users.noreply.github.com> Date: Fri, 4 Apr 2025 03:31:41 +0100 Subject: [PATCH 2/4] Update logo (#741) --- art/.DS_Store | Bin 0 -> 6148 bytes art/logo.svg | 32 +++++++++++++++++++++----------- 2 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 art/.DS_Store diff --git a/art/.DS_Store b/art/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 + - - - - - - - - - + + + + + + + + + + + + + + + + + + From d17ffe37cf80170b2b7c2c1a2cd58f7a7a6fff0b Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 3 Apr 2025 21:31:54 -0500 Subject: [PATCH 3/4] Delete art/.DS_Store --- art/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 art/.DS_Store diff --git a/art/.DS_Store b/art/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 Date: Mon, 21 Apr 2025 16:21:34 +0200 Subject: [PATCH 4/4] Added email to X provider (#742) * feat(x): Added email to XProvider X has added email to OAuth2: https://devcommunity.x.com/t/announcing-support-for-email-address-retrieval-with-oauth-2-0-in-the-x-api-v2/240555 * Formatting --------- Co-authored-by: Taylor Otwell --- src/Two/XProvider.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/Two/XProvider.php b/src/Two/XProvider.php index 8a1d5da7..57f8c67d 100644 --- a/src/Two/XProvider.php +++ b/src/Two/XProvider.php @@ -30,9 +30,21 @@ protected function getUserByToken($token) { $response = $this->getHttpClient()->get('https://api.x.com/2/users/me', [ RequestOptions::HEADERS => ['Authorization' => 'Bearer '.$token], - RequestOptions::QUERY => ['user.fields' => 'profile_image_url'], + RequestOptions::QUERY => ['user.fields' => 'profile_image_url,confirmed_email'], ]); return Arr::get(json_decode($response->getBody(), true), 'data'); } + + /** + * {@inheritdoc} + */ + protected function mapUserToObject(array $user) + { + $user = parent::mapUserToObject($user); + + $user->email = $user['confirmed_email']; + + return $user; + } }