question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide a way to pass in an authenticated auth client

See original GitHub issue

In the GAPIC clients, I can do something like this:

const {GoogleAuth} = require('google-auth-library');
const {CloudBuildClient} = require('@google-cloud/cloudbuild');

const auth = new GoogleAuth();
const buildy = new CloudBuildClient({ auth: auth });

This is nice because I can create a single auth client, and then share it across multiple services. It drastically reduces process startup when metadata servers are involved. However … I can’t seem to find a way to do this with our hand written libraries 😦 Is there a way I don’t know about to pass a pre-obtained auth client?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
stephenpluspluscommented, Jan 27, 2021

@oscar60310 thanks! I sent a PR here: https://github.com/googleapis/nodejs-storage/pull/1391, please take a look!

1reaction
stephenpluspluscommented, Sep 3, 2020

This was meant to be possible, so I’m not sure if we lost it along the way, or we accidentally left some wires unconnected. But it should be easy enough. PR coming!

Read more comments on GitHub >

github_iconTop Results From Across the Web

OAuth 2.0 Client Authentication - Takahiko Kawasaki - Medium
To use this method, first, build a string by concatenating a client ID, a colon and a client secret. Next, encode the string...
Read more >
Client Credentials Flow - Auth0
The application authenticates with the Auth0 Authorization Server using its Client ID and Client Secret ( /oauth/token endpoint). Auth0 Authorization Server ...
Read more >
Client authentication - IBM
The server authenticates the client by receiving the client's certificate during the SSL handshake and verifying the certificate is valid. Validation is done...
Read more >
How should I pass login data from client to server using REST ...
I recommend keeping your RESTful interface stateless. This means for every request, you must pass in all authentication information.
Read more >
HTTP authentication - MDN Web Docs - Mozilla
Usually a client will present a password prompt to the user and will then issue the request including the correct Authorization header. A ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found