관리자 AI 제공자 Google OAuth 스코프 형식 수정
Some checks failed
API contract / OpenAPI type drift (push) Failing after 50s
Some checks failed
API contract / OpenAPI type drift (push) Failing after 50s
This commit is contained in:
parent
2e4a6139f0
commit
83a6c8820c
2 changed files with 22 additions and 1 deletions
|
|
@ -69,7 +69,13 @@ _AGY_OAUTH = {
|
|||
"redirect_uri": "http://localhost:1455/auth/callback",
|
||||
"client_id": "1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com",
|
||||
"client_secret": "GOCSPX-K58FWR486LdLJ1mLB8sXC4zqDAf",
|
||||
"scope": "auth/cloud-platform auth/userinfo.email auth/userinfo.profile auth/cclog auth/experimentsandconfigs",
|
||||
"scope": (
|
||||
"https://www.googleapis.com/auth/cloud-platform "
|
||||
"https://www.googleapis.com/auth/userinfo.email "
|
||||
"https://www.googleapis.com/auth/userinfo.profile "
|
||||
"https://www.googleapis.com/auth/cclog "
|
||||
"https://www.googleapis.com/auth/experimentsandconfigs"
|
||||
),
|
||||
"user_agent": "antigravity/cli/1.0.0 (aidev_client; os_type=windows; arch=amd64; auth_method=consumer)",
|
||||
"code_assist_base": "https://cloudcode-pa.googleapis.com",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,6 +63,21 @@ class StartOAuthTest(unittest.TestCase):
|
|||
self.assertIn("code_challenge_method=S256", result["authorize_url"])
|
||||
self.assertNotIn("callback_url", result["authorize_url"])
|
||||
|
||||
def test_agy_authorize_url_uses_absolute_scope_urls(self):
|
||||
# 구글은 축약형(auth/...) 스코프를 인식하지 못해 invalid_scope로 거부한다.
|
||||
result = svc.start_oauth("agy", "admin@example.com")
|
||||
authorize_url = result["authorize_url"]
|
||||
self.assertIn("https://accounts.google.com/o/oauth2/v2/auth?", authorize_url)
|
||||
for scope in (
|
||||
"cloud-platform",
|
||||
"userinfo.email",
|
||||
"userinfo.profile",
|
||||
"cclog",
|
||||
"experimentsandconfigs",
|
||||
):
|
||||
self.assertIn(f"https://www.googleapis.com/auth/{scope}", authorize_url)
|
||||
self.assertNotIn("scope=auth/", authorize_url)
|
||||
|
||||
def test_pending_expires(self):
|
||||
import time
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue