-
Notifications
You must be signed in to change notification settings - Fork 408
Description
Is your feature request related to a problem? Please describe.
maybe related to #1703
I think It is not natural for the client to always have the service account json file, and I want to access the firebase admin through impersonate service account generated by gcloud auth application-default login --impersonate-service-account=
which the service account has permission for generating custom token.
However, when I use the service account which now stored in ADC, firebase admin throws an error message: 'Refresh token must contain a "client_id" property.'
.
In fact, the impersonate service account does not have a client_id itself, but it is contained in source_credentials like:
{
"delegates": [],
"service_account_impersonation_url": "",
"source_credentials": {
"client_id": "",
"client_secret": "",
"refresh_token": "",
"type": "authorized_user"
},
"type": "impersonated_service_account"
}
Describe the solution you'd like
When checking ADC's service account, if type is impersonated_service_account
, then check source_credentials
.
Describe alternatives you've considered
I can manually get my service account from ADC and use 'source_credentials'. But is it really the only solution for checking impersonated service account?
Additional context
No additional context