Skip to content

feat: add Google OAuth authentication support #440

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Conversation

izyuumi
Copy link

@izyuumi izyuumi commented Jun 27, 2025

  • Implement Google OAuth authorization flow
  • Add callback server for handling OAuth responses
  • Integrate Google authentication into CLI commands
  • Enable access token management for Google users

- Implement Google OAuth authorization flow
- Add callback server for handling OAuth responses
- Integrate Google authentication into CLI commands
- Enable access token management for Google users
@izyuumi
Copy link
Author

izyuumi commented Jun 27, 2025

Any ideas as to how I can fix this AI_APICallError: Request had insufficient authentication scopes. error?
CleanShot 2025-06-27 at 09 42 25@2x

@izyuumi
Copy link
Author

izyuumi commented Jun 27, 2025

This PR would fix #402

@ZeroIDdev
Copy link

check the cline implementation of gemini cli as provider

@izyuumi
Copy link
Author

izyuumi commented Jun 28, 2025

Thank you for the advice. I'll note this here for myself: cline/cline#4472

@Gibgoyt
Copy link

Gibgoyt commented Jun 28, 2025

Is this PR something similar to what Gemini CLI has when we log in with our Google Account and then still have free access to Gemini 2.5 Pro models? Or is it still like the API where there is only a free tier on the 2.5 flash only??

@izyuumi
Copy link
Author

izyuumi commented Jun 28, 2025

@Gibgoyt The former, where it's like Google CLI free access to Gemini 2.5 Pro!

…t API

- Add Gemini CLI OAuth credentials format compatibility
- Implement Google Cloud Code Assist API integration
- Add automatic project discovery functionality
- Support both Auth system and Gemini CLI credential storage

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@izyuumi
Copy link
Author

izyuumi commented Jun 28, 2025

I now need a GOOGLE_CLOUD_PROJECT or something similar (here). Does anyone have any idea where I could find the one used for Gemini CLI (is it even allowed to used that?)? Below is the error I am getting atm.
CleanShot 2025-06-28 at 22 31 16@2x

@SachinJadeja
Copy link

@izyuumi I dont think you can get one used in google cli but since its only OAuth, someone could create the Oauth credentials and put it under the env vars. Probably @thdxr could help here(for the credentials).

@izyuumi
Copy link
Author

izyuumi commented Jun 28, 2025

Thanks for the info. If you could help, it'd be really appreciated @thdxr

@Gibgoyt
Copy link

Gibgoyt commented Jun 28, 2025

Yo, I cloned, added my Google Auth 2 client key and secret
I cloned your git commit

I am assuming that's all I need to do? I logged in fine, but can't get responses from Gemini, some API error
opencode-fork-error

@thdxr
Copy link
Collaborator

thdxr commented Jun 29, 2025

https://x.com/cline/status/1939129177807913024

i'm still planning on making a plugin system and people can load their own plugins but we can't support this officially

@izyuumi
Copy link
Author

izyuumi commented Jun 29, 2025

Makes sense 😭

@aspiers
Copy link
Contributor

aspiers commented Jun 30, 2025

@thdxr Please see cline/cline#4495 - unless I'm misunderstanding, it looks like the Gemini CLI maintainer isn't against other agents routing requests through their offering as long as it's done in the right way. Seems that he's already collaborating with the Cline team to get this done, so maybe opencode can launch a similar collab?

@thdxr thdxr self-assigned this Jul 2, 2025
@izyuumi izyuumi closed this Jul 12, 2025
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.

6 participants