Questions tagged [google-auth-library-nodejs]

DONTUSE [Google-api-nodejs-client](https://stackoverflow.com/questions/tagged/google-api-nodejs-client)

21 questions
4
votes
2 answers

TypeError: Cannot read property 'redirect_uris' of undefined

I want to write an app that can process some of my gmail emails that are labeled a certain way. The example code here gave me a starting point for my code (which I've rewritten using promises instead of async await): 'use strict'; const path =…
3
votes
0 answers

How to authenticate to Cloud Function using a node.js client

I have a node.js application running in GKE that needs to be able to make a server-to-server call to a Cloud Function that has permission configured to only allow the service account configured on the GKE pod to invoke it. So basically, the node.js…
3
votes
0 answers

How does google sign-in for Android application work?

This is my understanding about auth flow for a web application; This is recommended for mobile application, as per RFC 8252 When I go to Google developers console > Create Credentials > OAuth Client id > Android [Application type], it asks me for:…
2
votes
0 answers

How to send binary data in Gaxios request object with Oauth2Client in google-auth-library-nodejs

I am attempting to upload photos to an authenticated account with google-auth-library-nodejs, mostly following the example here. I have successfully authenticated the client with OAuth2Client and am making a post request first with the image, then…
1
vote
0 answers

Google API Authentication: are there alternatives to service account keys?

I'm seeking your advice to piece together a mechanism that would facilitate authentication to Dialogflow ES and CX to allow running experiments on multiple agents (projects) from our workbench application in a smooth and error-proof manner. The…
1
vote
1 answer

Google IAP using Node certificate has expired error?

I have a node server which needs to connect to an IAP (Identity Aware Proxy) protected API endpoint. The below example from Google seems to be fine expect for the certificate has expired error. I believe I simply need to send rejectUnauthorized:…
0
votes
0 answers

@hapi/boom not returning correct error, instead "500 : Internal Server Error"

@hapi/boom is not returning correct error as thrown in code. Here is the code sample: controller.ts async (request: IRequest, h: IResponse) => { .... // some logic const userInfo = await verify(email, authToken) if (!userInfo) throw…
0
votes
0 answers

Google Search Console API: How do I Solve "User does not have sufficient permission for site"? (When User Has Permissions)

I'm trying to use Google's Search Console API via their Node package, and my code looks like the following: const auth = new GoogleAuth({ scopes: 'https://www.googleapis.com/auth/webmasters.readonly', }); const webmasters =…
machineghost
  • 28,573
  • 26
  • 128
  • 197
0
votes
1 answer

Can one batch requests with google-auth-library?

The way I have been using the client thus far has been like client = new OAuth2Client( process.env.GOOGLE_CLIENT_ID, process.env.GOOGLE_CLIENT_SECRET, "http://localhost:5000/oauth2callback" ); …
0
votes
1 answer

Google My Business: How to generate access token without user interaction

I want to use a Google My Business API to search and manage the businesses of our clients using my organization account detail. I want to use API as an Agency as I want to manage our clients' businesses. I've submitted the API access form and got…
0
votes
0 answers

Is it possible to test if the google default credentials have already been established in nodejs environment with Google Auth Library

I would like to test if a Google Auth Default credential already exists within the current node environment, prior to providing a path to the default credentials. If no default credential can be found, then I will set the…
cognify
  • 45
  • 6
0
votes
0 answers

Can't mock the OAuth2Client google-auth-library to write test cases

I've looked at several similar questions but none of the cases fit my problem. I'm trying to mock google-auth-library OAuth2Client. code.ts const {OAuth2Client} = require('google-auth-library'); const client = new OAuth2Client(clietIds); export…
0
votes
2 answers

Dependency resolution errors with firebase flutter app

I updated firebase admin for my firebase functions and also grpc when I tried to build my app it gave this error: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:checkDebugDuplicateClasses'. > 1 exception…
0
votes
2 answers

Domain-wide delegation using default credentials in Google Cloud Run

I'm using a custom service account (using --service-account parameter in the deploy command). That service account has domain-wide delegation enabled and it's installed in the G Apps Admin panel. I tried this code: app.get('/test', async (req, res)…
0
votes
0 answers

GCP - Cloud Function Domain Wide Delegation using Application Default Credential (no -jwt)

I'm trying to create a cloud function, NodeJS based, that use domain wide delegation access to consume the API method gmail.users.settings.delegates.list. I looking for a solution that does not use the service account JSON key, i want to use default…
1
2