From 7903808ed504978b6c4dbc8bc34f4d1d62458891 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 28 May 2026 22:36:16 +1200 Subject: [PATCH] revert: roll back OAuth adapter changes Co-Authored-By: Claude Opus 4.7 (1M context) --- src/Appwrite/Auth/OAuth2/Amazon.php | 4 +++- src/Appwrite/Auth/OAuth2/Bitly.php | 2 +- src/Appwrite/Auth/OAuth2/Box.php | 4 +++- src/Appwrite/Auth/OAuth2/Etsy.php | 4 +++- src/Appwrite/Auth/OAuth2/Facebook.php | 4 +++- src/Appwrite/Auth/OAuth2/Figma.php | 4 +++- src/Appwrite/Auth/OAuth2/Kick.php | 2 +- src/Appwrite/Auth/OAuth2/Microsoft.php | 4 +++- src/Appwrite/Auth/OAuth2/Notion.php | 4 +++- src/Appwrite/Auth/OAuth2/Slack.php | 4 +++- src/Appwrite/Auth/OAuth2/Stripe.php | 4 +++- src/Appwrite/Auth/OAuth2/Tradeshift.php | 4 +++- src/Appwrite/Auth/OAuth2/Twitch.php | 4 +++- src/Appwrite/Auth/OAuth2/X.php | 2 +- src/Appwrite/Auth/OAuth2/Yahoo.php | 4 +++- src/Appwrite/Auth/OAuth2/Yammer.php | 4 +++- 16 files changed, 42 insertions(+), 16 deletions(-) diff --git a/src/Appwrite/Auth/OAuth2/Amazon.php b/src/Appwrite/Auth/OAuth2/Amazon.php index 5148aa8e88..2fa3f4cfe9 100644 --- a/src/Appwrite/Auth/OAuth2/Amazon.php +++ b/src/Appwrite/Auth/OAuth2/Amazon.php @@ -149,7 +149,9 @@ class Amazon extends OAuth2 */ public function isEmailVerified(string $accessToken): bool { - return false; + $email = $this->getUserEmail($accessToken); + + return !empty($email); } /** diff --git a/src/Appwrite/Auth/OAuth2/Bitly.php b/src/Appwrite/Auth/OAuth2/Bitly.php index a9964d5d6d..290876a8cb 100644 --- a/src/Appwrite/Auth/OAuth2/Bitly.php +++ b/src/Appwrite/Auth/OAuth2/Bitly.php @@ -157,7 +157,7 @@ class Bitly extends OAuth2 */ public function isEmailVerified(string $accessToken): bool { - return false; + return true; } /** diff --git a/src/Appwrite/Auth/OAuth2/Box.php b/src/Appwrite/Auth/OAuth2/Box.php index b9729a398f..e88c165833 100644 --- a/src/Appwrite/Auth/OAuth2/Box.php +++ b/src/Appwrite/Auth/OAuth2/Box.php @@ -150,7 +150,9 @@ class Box extends OAuth2 */ public function isEmailVerified(string $accessToken): bool { - return false; + $email = $this->getUserEmail($accessToken); + + return !empty($email); } /** diff --git a/src/Appwrite/Auth/OAuth2/Etsy.php b/src/Appwrite/Auth/OAuth2/Etsy.php index 899532c95a..6e0da14437 100644 --- a/src/Appwrite/Auth/OAuth2/Etsy.php +++ b/src/Appwrite/Auth/OAuth2/Etsy.php @@ -157,7 +157,9 @@ class Etsy extends OAuth2 */ public function isEmailVerified(string $accessToken): bool { - return false; + $email = $this->getUserEmail($accessToken); + + return !empty($email); } /** diff --git a/src/Appwrite/Auth/OAuth2/Facebook.php b/src/Appwrite/Auth/OAuth2/Facebook.php index d37825dc89..90fe8e7388 100644 --- a/src/Appwrite/Auth/OAuth2/Facebook.php +++ b/src/Appwrite/Auth/OAuth2/Facebook.php @@ -131,7 +131,9 @@ class Facebook extends OAuth2 */ public function isEmailVerified(string $accessToken): bool { - return false; + $email = $this->getUserEmail($accessToken); + + return !empty($email); } /** diff --git a/src/Appwrite/Auth/OAuth2/Figma.php b/src/Appwrite/Auth/OAuth2/Figma.php index 361eda85c9..b5e53cbed4 100644 --- a/src/Appwrite/Auth/OAuth2/Figma.php +++ b/src/Appwrite/Auth/OAuth2/Figma.php @@ -139,7 +139,9 @@ class Figma extends OAuth2 */ public function isEmailVerified(string $accessToken): bool { - return false; + $email = $this->getUserEmail($accessToken); + + return !empty($email); } /** diff --git a/src/Appwrite/Auth/OAuth2/Kick.php b/src/Appwrite/Auth/OAuth2/Kick.php index 0a1aec41ef..85b447fcd8 100644 --- a/src/Appwrite/Auth/OAuth2/Kick.php +++ b/src/Appwrite/Auth/OAuth2/Kick.php @@ -152,7 +152,7 @@ class Kick extends OAuth2 */ public function isEmailVerified(string $accessToken): bool { - return false; + return !empty($this->getUserEmail($accessToken)); } /** diff --git a/src/Appwrite/Auth/OAuth2/Microsoft.php b/src/Appwrite/Auth/OAuth2/Microsoft.php index 6dae74f08b..19966ec1ac 100644 --- a/src/Appwrite/Auth/OAuth2/Microsoft.php +++ b/src/Appwrite/Auth/OAuth2/Microsoft.php @@ -147,7 +147,9 @@ class Microsoft extends OAuth2 */ public function isEmailVerified(string $accessToken): bool { - return false; + $email = $this->getUserEmail($accessToken); + + return !empty($email); } /** diff --git a/src/Appwrite/Auth/OAuth2/Notion.php b/src/Appwrite/Auth/OAuth2/Notion.php index ce90da60d3..c2f1ee98e4 100644 --- a/src/Appwrite/Auth/OAuth2/Notion.php +++ b/src/Appwrite/Auth/OAuth2/Notion.php @@ -137,7 +137,9 @@ class Notion extends OAuth2 */ public function isEmailVerified(string $accessToken): bool { - return false; + $email = $this->getUserEmail($accessToken); + + return !empty($email); } /** diff --git a/src/Appwrite/Auth/OAuth2/Slack.php b/src/Appwrite/Auth/OAuth2/Slack.php index aaf0df6859..9c87e45ed6 100644 --- a/src/Appwrite/Auth/OAuth2/Slack.php +++ b/src/Appwrite/Auth/OAuth2/Slack.php @@ -131,7 +131,9 @@ class Slack extends OAuth2 */ public function isEmailVerified(string $accessToken): bool { - return false; + $email = $this->getUserEmail($accessToken); + + return !empty($email); } /** diff --git a/src/Appwrite/Auth/OAuth2/Stripe.php b/src/Appwrite/Auth/OAuth2/Stripe.php index 9e4cabdcb4..9d1c9206ad 100644 --- a/src/Appwrite/Auth/OAuth2/Stripe.php +++ b/src/Appwrite/Auth/OAuth2/Stripe.php @@ -146,7 +146,9 @@ class Stripe extends OAuth2 */ public function isEmailVerified(string $accessToken): bool { - return false; + $email = $this->getUserEmail($accessToken); + + return !empty($email); } /** diff --git a/src/Appwrite/Auth/OAuth2/Tradeshift.php b/src/Appwrite/Auth/OAuth2/Tradeshift.php index 7ca92789f7..8d0bfa8784 100644 --- a/src/Appwrite/Auth/OAuth2/Tradeshift.php +++ b/src/Appwrite/Auth/OAuth2/Tradeshift.php @@ -154,7 +154,9 @@ class Tradeshift extends OAuth2 */ public function isEmailVerified(string $accessToken): bool { - return false; + $email = $this->getUser($accessToken); + + return !empty($email); } /** diff --git a/src/Appwrite/Auth/OAuth2/Twitch.php b/src/Appwrite/Auth/OAuth2/Twitch.php index 778ced89e1..ed73054c31 100644 --- a/src/Appwrite/Auth/OAuth2/Twitch.php +++ b/src/Appwrite/Auth/OAuth2/Twitch.php @@ -144,7 +144,9 @@ class Twitch extends OAuth2 */ public function isEmailVerified(string $accessToken): bool { - return false; + $email = $this->getUserEmail($accessToken); + + return !empty($email); } /** diff --git a/src/Appwrite/Auth/OAuth2/X.php b/src/Appwrite/Auth/OAuth2/X.php index 3b9eec60f8..d12ce25b33 100644 --- a/src/Appwrite/Auth/OAuth2/X.php +++ b/src/Appwrite/Auth/OAuth2/X.php @@ -149,7 +149,7 @@ class X extends OAuth2 */ public function isEmailVerified(string $accessToken): bool { - return false; + return !empty($this->getUserEmail($accessToken)); } /** diff --git a/src/Appwrite/Auth/OAuth2/Yahoo.php b/src/Appwrite/Auth/OAuth2/Yahoo.php index 2a1b76c877..1a6c6b860d 100644 --- a/src/Appwrite/Auth/OAuth2/Yahoo.php +++ b/src/Appwrite/Auth/OAuth2/Yahoo.php @@ -164,7 +164,9 @@ class Yahoo extends OAuth2 */ public function isEmailVerified(string $accessToken): bool { - return false; + $email = $this->getUserEmail($accessToken); + + return !empty($email); } /** diff --git a/src/Appwrite/Auth/OAuth2/Yammer.php b/src/Appwrite/Auth/OAuth2/Yammer.php index 451ec79be2..9e1827bc58 100644 --- a/src/Appwrite/Auth/OAuth2/Yammer.php +++ b/src/Appwrite/Auth/OAuth2/Yammer.php @@ -133,7 +133,9 @@ class Yammer extends OAuth2 */ public function isEmailVerified(string $accessToken): bool { - return false; + $email = $this->getUserEmail($accessToken); + + return !empty($email); } /**