-
Notifications
You must be signed in to change notification settings - Fork 429
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
Also, this is a service account. I am unsure how that factors into things here. #411
Comments
I am unsure what happened that this got created.... There's more context in the linked comment thread. Essentially I'm trying to access an identity token for a service account, but getIdToken() is returning undefined. Here's how I'm creating my service:
|
got same problem. const service = OAuth2.createService('CloudFunctions')
.setTokenUrl('https://accounts.google.com/o/oauth2/token')
//.setTokenUrl('https://oauth2.googleapis.com/token') // I tried both tokenUrl patterns.
.setPrivateKey(serviceAccount.private_key)
.setIssuer(serviceAccount.client_email)
.setScope('https://www.googleapis.com/auth/cloud-platform openid');
service.getToken(); and I got below. {
"access_token": "ya29.c.XXXXXX....",
"expires_in": 3599,
"token_type": "Bearer",
"expiresAt": 1697112737
} Why can I not get id_token, nor access getIdToken method? |
try something like
|
Also, this is a service account. I am unsure how that factors into things here.
Edit:
I'm using service.getIdToken() to retrieve the identity token.
Originally posted by @biowalker in #322 (comment)
The text was updated successfully, but these errors were encountered: