firebase-admin-interop icon indicating copy to clipboard operation
firebase-admin-interop copied to clipboard

fix Credential.getAccessToken (returns a promise)

Open alextekartik opened this issue 4 years ago • 0 comments

As stated here:

https://firebase.google.com/docs/reference/admin/node/admin.credential.Credential-1#getaccesstoken

# getAccessToken

Returns a Google OAuth2 access token object used to authenticate with Firebase services.

Returns Promise<GoogleOAuthAccessToken>

getAccessToken returns a Promise. I changed the implementation and added a simple unit test (the change in firestore_test.dart is just a formatting change that was done automatically).

I have not setup any dart high level wrapper on Credential as I'm not sure how you would prefer it.

alextekartik avatar Nov 21 '20 22:11 alextekartik