Skip to content

fix(antigravity): refresh expired OAuth token and retry on 401 - #139

Merged
CodeZeno merged 1 commit into
CodeZeno:mainfrom
tamakichi23:fix/antigravity-oauth-refresh
Sep 24, 2026
Merged

CodeZeno merged 1 commit into
CodeZeno:mainfrom
tamakichi23:fix/antigravity-oauth-refresh

Conversation

@tamakichi23

Copy link
Copy Markdown
Contributor

Summary

  • Fix Antigravity usage polling getting stuck in AuthRequired after an access token expires on Windows.
  • Use the refresh token from the existing Windows credential to refresh the access token when it is expired or near expiry.
  • If loadCodeAssist or quota retrieval returns an authentication error, refresh the token and retry the polling request once.
  • Fall back to the existing AuthRequired behavior if refresh fails or the retry is rejected.
  • Keep the existing credential unchanged and do not log tokens, OAuth client secrets, or other sensitive data.
  • Update the README to accurately describe the OAuth refresh behavior.

Testing

  • Antigravity/provider tests: 119 passed.
  • Settings tests: 14 passed.
  • cargo fmt -- --check: passed.
  • cargo clippy: passed.
  • cargo build --release --locked: passed.
  • git diff --check: passed.
  • Manually verified on Windows that Antigravity quota polling recovered from an existing 401 / AuthRequired state without signing in to Antigravity again.
  • Full test suite: 434 passed, 3 ignored, 2 failed in unchanged Theme Studio tests:
    • studio_app::tests::diagnostics_page_has_logging_controls_and_menu_version
    • studio_app::tests::version_text_and_trailing_icon_share_one_update_button

Checklist

  • I have read CONTRIBUTING.md and CODE_OF_CONDUCT.md.
  • The change is focused and contains no credentials or sensitive data.
  • I have added or updated relevant documentation and tests, where applicable.
  • I have left changelog and version changes to maintainers unless requested.

@CodeZeno
CodeZeno merged commit baa53a4 into CodeZeno:main Sep 24, 2026
2 checks passed
@tamakichi23
tamakichi23 deleted the fix/antigravity-oauth-refresh branch September 24, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants