google-gemini / google-gemini/gemini-cli

Infinite auth loop

Open
#28,341 7 comments 10 reactions 0 assignees View on GitHub
area/core effort/medium kind/bug priority/p1 status/bot-triaged
Dominant language
TypeScript
Stars
107k
Forks
14.6k
Avg merge
2d 3h
Merged PRs (30d)
45

Description

### What happened?

Gemini CLI keeps re-entering the OAuth flow on Windows, preventing me from using the application. I tried downgrading to previous versions (from v0.45.0 to v0.49.0), but the same error occurs. The following happens:

* How would you like to authenticate for this project?
* Opening authentication page in your browser. Otherwise navigate to…
* Attempting to open authentication page in your browser.
* Waiting for authentication...
* Authentication succeeded
* You've successfully signed in with Google. Gemini CLI needs to be restarted. Press R to restart, or Esc to choose a different authentication method.
* How would you like to authenticate for this project?

And the same repeats over and over and over.

### What did you expect to happen?

OAuth succeeds and credentials are saved; subsequent runs should enter the CLI session without prompting for Google login again.

### Client information

Unable to obtain, as unable to access the CLI.

### Login information

Google Account, using Gemini Code Assist subscription

### Anything else we need to know?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the OAuth flow on Windows and tracing the CLI's authentication, credential-saving, and restart paths. Check why the successful sign-in returns to the authentication prompt instead of persisting credentials. Done means OAuth completes once, credentials are saved, and subsequent CLI runs enter the session without prompting again.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authentication, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.