Skip to content
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

Vertex AI authentication issues #622

Closed
palladius opened this issue May 15, 2024 · 3 comments
Closed

Vertex AI authentication issues #622

palladius opened this issue May 15, 2024 · 3 comments

Comments

@palladius
Copy link
Contributor

I'm having issues authenticating with Vertex with APPLICATION_DEFAULT_CREDENTIALS.
I found a simple fix though.

FROM

  @authorizer = ::Google::Auth.get_application_default

TO

  @authorizer = ::Google::Auth.get_application_default(scope: 'https://www.googleapis.com/auth/cloud-platform')
@palladius
Copy link
Contributor Author

Without fix:

 VertexLLM.authorizer.fetch_access_token
(irb):1:in `<main>': Authorization failed.  Server message: (Signet::AuthorizationError)
{"error":"invalid_scope","error_description":"Invalid OAuth scope or ID token audience provided."}

With fix:

VertexLLM.authorizer.fetch_access_token
=> 
{"access_token"=>
  "ya29xxx",
 "expires_in"=>3599,
 "token_type"=>"Bearer",
 "granted_scopes"=>nil}

palladius added a commit to palladius/langchainrb that referenced this issue May 15, 2024
adding scope as it saltuarily gives me error. See  issue patterns-ai-core#622 

(patterns-ai-core#622)
andreibondarev added a commit that referenced this issue May 15, 2024
* Adding scipe to auth in google_vertex_ai.rb

adding scope as it saltuarily gives me error. See  issue #622 

(#622)

* Update google_vertex_ai.rb

---------

Co-authored-by: Andrei Bondarev <andrei@sourcelabs.io>
@andreibondarev
Copy link
Collaborator

@palladius I think we can close this one, right?

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

No branches or pull requests

2 participants