-
Notifications
You must be signed in to change notification settings - Fork 371
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
support standard credential interfaces #334
Comments
Hmmm this issue does not seem to follow the issue template. Make sure you provide all the required information. |
Hey there! I couldn't figure out what this issue is about, so I've labeled it for a human to triage. Hang tight. |
I ran into several issues last time I tried supporting google-auth credentials (can't remember what those were exactly right now). But if you want to support more custom credentials, you can do so by implementing the Credential interface provided by the Admin SDK: https://firebase.google.com/docs/reference/admin/node/admin.credential.Credential |
@ptone can you comment on how you think this should be exposed to the developers? What should the These are the options I can think of: Option 1This is what other Node.js GCP libraries support. But this doesn't support refresh token credentials, which is something we do support today.
Option 2This has more in common with how the credentials are exposed in other languages (Java, Go, C# etc). Notice that this calls a bunch of
|
Option 3
|
GCP Node.js libraries seem to follow the configuration mechanism outlined here: https://github.com/googleapis/google-cloud-node/blob/master/docs/authentication.md |
Thanks for looking at this @hiranya911 I recall Python libs having the cleanest interface definition of a token, basically duck type so long as you have a refresh method, and a access_token and expiration set of attributes. The client library will call your refresh method as needed. So I see this less about initializing with the well-known credential data, and more about providing an interface. In go with would be the tokensource https://godoc.org/golang.org/x/oauth2#TokenSource Anything that can provide a token, can be used with the client-libs. |
Thanks @ptone. I think in our case that interface is However, it seems all the Node.js GCP libraries are designed to work with only 2 types of credentials:
This means APIs like Firestore and GCS will not work with custom credentials. I will follow up with the GCP Node.js team and try to figure out what their thinking here is. |
Feature request to support standard Google credential interfaces to support more custom credential integrations.
https://github.com/google/google-auth-library-nodejs
Currently this library uses bespoke approaches such as:
firebase-admin-node/src/firestore/firestore.ts
Line 90 in 5d43af1
The text was updated successfully, but these errors were encountered: