OAuth 댄스
표준 Google OAuth: access token 이 ~1 시간 유효. 이후 refresh token 을 oauth2.googleapis.com/token 에 grant_type=refresh_token 으로 POST, 새 access token 받음. 새 expiry persist; 죽기 전에 rotate.
loadCodeAssist — 건너뛸 수 없는 pre-flight
OAuth path 의 첫 generate 호출 전에 loadCodeAssist 호출 필수. 이후 모든 generateContent body 의 project field 에 pass 해야 하는 cloudaicompanionProject string 반환. 건너뛰면 헷갈리는 에러 의 HTTP 500 받음.
OAuth client credential 이 public
Gemini CLI 가 hardcoded client_id, client_secret 으로 ship. Public — CLI 돌리는 누구나 같은 pair 사용. Google 이 secret 아니라 identifier 로 다룸. 너 자신의 OAuth flow 에 사용 가능.