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

Some requests are passing the auth, and some not. #5906

Open
nod38 opened this issue Dec 30, 2024 · 0 comments
Open

Some requests are passing the auth, and some not. #5906

nod38 opened this issue Dec 30, 2024 · 0 comments

Comments

@nod38
Copy link

nod38 commented Dec 30, 2024

PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.

Hello I am facing an issue where some of my requests are passing the client auth and some not.
I am using credentials auth. Init client example bellow (behaviour is the same if I pass the projectId too):

const client = new VehicleServiceClient({ credentials: { client_email: superServiceAccount, private_key: superPrivateKey, }, });

Example that works is client.searchVehicles(...)

Example that does NOT work is client.createVehicle(...) it returns Error: 7 PERMISSION_DENIED: JWT does not contain any scopes.

  • This is fully strange for me because I used client.auth.getAccessToken() to get the token and then decoded it on https://oauth2.googleapis.com/tokeninfo?access_token=, and got this bellow which seems fine:
    { "azp": "107260674233372867632", "aud": "107260674233372867632", "scope": "https://www.googleapis.com/auth/cloud-platform", "exp": "1735572110", "expires_in": "3565", "access_type": "online" }
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

1 participant