From 9ad08694ed694fd183995010e1d5fe9d8d53b768 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Oct 2025 23:01:33 +0000 Subject: [PATCH 1/2] Initial plan From 627adb43e0a3e3ab680506a050b6e8bb1686f915 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Oct 2025 23:12:28 +0000 Subject: [PATCH 2/2] Add access_type=offline and prompt=consent to Google OAuth2 login URL to enable refresh tokens Co-authored-by: stnguyen90 <1477010+stnguyen90@users.noreply.github.com> --- src/Appwrite/Auth/OAuth2/Google.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Auth/OAuth2/Google.php b/src/Appwrite/Auth/OAuth2/Google.php index c6f621b814..79894c2422 100644 --- a/src/Appwrite/Auth/OAuth2/Google.php +++ b/src/Appwrite/Auth/OAuth2/Google.php @@ -53,7 +53,9 @@ class Google extends OAuth2 'redirect_uri' => $this->callback, 'scope' => \implode(' ', $this->getScopes()), 'state' => \json_encode($this->state), - 'response_type' => 'code' + 'response_type' => 'code', + 'access_type' => 'offline', + 'prompt' => 'consent' ]); }