fix: request google oauth refresh tokens

This commit is contained in:
lda
2026-06-13 04:54:21 +07:00 Verified
parent 85b2ca8bc7
commit 87a7cf9e86
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -80,6 +80,8 @@ class OAuthCodeLoginFlow:
authorization_url, state = client.create_authorization_url(
str(provider.auth_url),
redirect_uri=provider.redirect_uri,
access_type="offline",
prompt="consent",
)
if authorization_url_callback is not None:
callback_response = authorization_url_callback(authorization_url, state)
+2
View File
@@ -113,6 +113,8 @@ async def test_oauth_code_login_flow_uses_injected_client() -> None:
client = clients[0]
assert client.init_kwargs["redirect_uri"] == provider.redirect_uri
assert client.auth_kwargs["redirect_uri"] == provider.redirect_uri
assert client.auth_kwargs["access_type"] == "offline"
assert client.auth_kwargs["prompt"] == "consent"
assert client.fetch_calls == ["http://127.0.0.1/callback?code=abc&state=state-123"]