google-gemini / google-gemini/gemini-cli
stuck in auth loop , to submit this but due to again and again login not working on temp. basis choose second option. I am a pro member and tried agy recently , needed something to daiy drive , installed gemini-cli and this happening.
- Dominant language
- TypeScript
- Stars
- 107k
- Forks
- 14.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 45
Description
### What happened?
stuck in auth loop , to submit this but due to again and again login not working on temp. basis chose second option.
### What did you expect to happen?
I expected to get logged in as similar to agy , and other auth tools but this time it is stuck in loop and asking me on loop to select a login method , even after logging in and authorising.
### Client information
* **CLI Version:** 0.59.0
* **Git Commit:** fb0d535af
* **Session ID:** a3d6158b-6520-4545-a11b-6861c25d3256
* **Operating System:** linux v24.21.0
* **Sandbox Environment:** no sandbox
* **Model Version:** auto
* **Auth Type:** gemini-api-key
* **Memory Usage:** 300.2 MB
* **Terminal Name:** Unknown
* **Terminal Background:** Unknown
* **Kitty Keyboard Protocol:** Unsupported
### Login information
Tried google account , not working since 5 tries so selected api key:
Gemini CLI is restarting to apply the trust changes...
▝▜▄ ▗█▀▀▜▙▝█▛▀▀▌▜██▖▟██▘▜█▘▜██▖▝█▛▝█▛
▝▜▄ █▌ █▙▟ ▐█▝█▛▐█ ▐█ ▐█▝█▖█▌ █▌
▗▟▀ ▜▙ ▝█▛ █▌▝ ▖▐█ ▐█ ▐█ ▐█ ▝██▌ █▌
▝▀ ▀▀▀▀▘▝▀▀▀▀▘▀▀▘ ▀▀▘▀▀▘▀▀▘ ▝▀▀▝▀▀
Gemini CLI v0.59.0
Tips for getting started:
1. Create GEMINI.md files to customize your interactions
2. /help for more information
3. Ask coding questions, edit code or run commands
4. Be specific for the best results
ℹ Attempting to open authentication page in your browser.
Otherwise navigate to:
https://accounts.google.com/o/oauth2/v2/auth?redirect_uri=http%3A%2F%2F127.0.0.
1%3A38577%2Foauth2callback&access_type=offline&scope=https%3A%2F%2Fwww.googleap
is.com%2Fauth%2Fcloud-platform%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuser
info.email%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile&state=a
61e2002202dfe56d624c7bcbb11da3b4279cd7a4e18a1a5c0d56abde2bf68c1&response_type=c
ode&client_id=681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercont
ent.com
ℹ Waiting for authentication...
ℹ Attempting to open authentication page in your browser.
Otherwise navigate to:
https://accounts.google.com/o/oauth2/v2/auth?redirect_uri=http%3A%2F%2F127.0.0.
1%3A39003%2Foauth2callback&access_type=offline&scope=https%3A%2F%2Fwww.googleap
is.com%2Fauth%2Fcloud-platform%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuser
info.email%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile&state=7
b64d0ae1c2ab2430d7ee03c19ad0f0720929c73d7f5591e1e53734ec07bf32e&response_type=c
ode&client_id=681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercont
ent.com
ℹ Waiting for authentication...
ℹ Authentication succeeded
ℹ Attempting to open authentication page in your browser.
Otherwise navigate to:
https://accounts.google.com/o/oauth2/v2/auth?redirect_uri=http%3A%2F%2F127.0.0.
1%3A45067%2Foauth2callback&access_type=offline&scope=https%3A%2F%2Fwww.googleap
is.com%2Fauth%2Fcloud-platform%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuser
info.email%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile&state=a
6c19396f346b44b5ae358b2e925f7d466668a8c4e3f4596835fa9296759549a&response_type=c
ode&client_id=681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercont
ent.com
ℹ Waiting for authentication...
ℹ Authentication succeeded
ℹ Attempting to open authentication page in your browser.
Otherwise navigate to:
https://accounts.google.com/o/oauth2/v2/auth?redirect_uri=http%3A%2F%2F127.0.0.
1%3A39969%2Foauth2callback&access_type=offline&scope=https%3A%2F%2Fwww.googleap
is.com%2Fauth%2Fcloud-platform%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuser
info.email%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile&state=2
290c2f66d32a7dfae3e52955e9b18fbfb6c1e5f6e3b11949db5ab4de937d1c8&response_type=c
ode&client_id=681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercont
ent.com
ℹ Waiting for authentication...
ℹ Authentication succeeded
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
> /quit
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
╭───────────────────────────────────────────────────────────────────────────────╮
│ │
│ Agent powering down. Goodbye! │
│ │
│ Interaction Summary │
│ Session ID: cd6318a7-fbfd-4037-9ca3-3abee7518f3f │
│ Tool Calls: 0 ( ✓ 0 x 0 ) │
│ Success Rate: 0.0% │
│ │
│ Performance │
│ Wall Time: 12m 30s │
│ Agent Active: 0s │
│ » API Time: 0s (0.0%) │
│ » Tool Time: 0s (0.0%) │
│ │
│ To resume this session: gemini --resume │
│ cd6318a7-fbfd-4037-9ca3-3abee7518f3f │
╰───────────────────────────────────────────────────────────────────────────────╯
### Anything else we need to know?
Just this , thx
Contributor guide
Research direction
Start by reproducing the authentication loop in Gemini CLI v0.59.0 on Linux, using the reported Google login and API-key fallback paths. Trace the authentication flow around repeated browser launches and successful callbacks. Done means a successful login reaches a usable CLI session without repeatedly asking for a login method.
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
- Needs clarification
- Newbie friendliness
- 42/100