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>
This commit is contained in:
copilot-swe-agent[bot] 2025-10-29 23:12:28 +00:00
parent 9ad08694ed
commit 627adb43e0

View file

@ -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'
]);
}