[RESOLVED] Authentication Required loop on macOS Root cause is corrupted Keychain entry, not app files

Category: Bug Report / Troubleshooting

Environment:

  • macOS (Sequoia / Sonoma / Ventura)

  • Antigravity latest version

  • Default browser: Brave

Problem Description

After signing in successfully via Google OAuth, Antigravity shows “Authentication Required — Please sign in” in the Agent panel indefinitely. The sign-in loop repeats endlessly:

  1. Click “Sign In” in Antigravity

  2. Browser opens Google auth page

  3. Successfully authenticate with Google

  4. Browser shows auth success

  5. Antigravity shows “Authentication Required” again ← stuck here

Additional symptom: Settings page correctly shows the signed-in Google account, but the Agent panel never recognizes it.

What Does NOT Fix This

Many users have tried these without success:

  • Reinstalling Antigravity

  • Deleting ~/Library/Application Support/Antigravity/

  • Deleting ~/.gemini/antigravity

  • Clearing browser cookies and cache

  • Using Ctrl+Shift+PAntigravity: Reset Onboarding

  • Restarting macOS

These all fail because they don’t touch the actual root cause.

Root Cause

Antigravity stores its authentication token in macOS Keychain under the name "Antigravity Safe Storage". This entry:

  • Persists across uninstalls — it is NOT removed when you delete the app

  • Persists across Library folder deletions — it lives in ~/Library/Keychains/, not ~/Library/Application Support/

  • Can become stale/corrupted if the token expires or auth flow is interrupted

When Antigravity launches, it reads this Keychain entry first. If the entry exists but contains an expired/corrupted token, the app fails silently and shows “Authentication Required” — even though a fresh sign-in attempt is blocked by the same corrupted entry.

Evidence: Other macOS user profiles on the same machine work perfectly, because each profile has its own isolated Keychain.

Fix

Step 1 — Kill the app:

pkill -f Antigravity

Step 2 — Clear app data:

rm -rf ~/Library/Application\ Support/Antigravity/
rm -rf ~/.gemini/antigravity
rm -rf ~/Library/Caches/Antigravity/

Step 3 — Delete the Keychain entry:

security delete-generic-password -l "Antigravity Safe Storage"

Expected output:

password has been deleted.

Step 4 — Sign in using Safari (not Brave — see note below):

  • Set Safari as default browser temporarily

  • Open Antigravity → Sign In → complete Google auth

  • Switch back to your preferred browser after

Note for Brave Browser Users

Brave’s “Auto-redirect tracking URLs” feature intercepts the OAuth callback URL and silently prevents the auth token from being handed back to the Antigravity desktop app. Use Safari or Firefox as your default browser when signing into Antigravity.

Verification

After applying the fix, confirm the Keychain entry was removed:

security find-generic-password -l "Antigravity Safe Storage"

Should return:

security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.

After successful sign-in, a new Keychain entry will be created automatically with a fresh valid token.

Request to the Antigravity Team

Please consider:

  1. Clearing the Keychain entry during uninstall — this would prevent the issue entirely

  2. Adding error handling when a Keychain token is expired — show a meaningful error instead of silently looping

  3. Adding a “Sign out” option that also clears the Keychain entry

This issue has affected a large number of macOS users (see related threads) and the root cause is non-obvious, causing many hours of troubleshooting.

Verified fix on macOS Sequoia, Antigravity v4.x, March 2026.



1 Like

Hello @thedevopsbro, welcome to AI Forum!

Thank you for sharing this update with the community. We are pleased to hear that the issue has been resolved. I have forwarded your findings and request to the concerned team.
Should you encounter any further difficulties, please do not hesitate to let us know.