googleapis_auth
googleapis_auth copied to clipboard
Support target audience
When setting a scope with target audience like this
final client = await clientViaServiceAccount(credentials, ['IAP_CLIENT_ID.apps.googleusercontent.com']);
JwtFlow.run() fails with
Exception: Unable to obtain credentials. Invalid response from server.
#0 JwtFlow.run (package:googleapis_auth/src/oauth2_flows/jwt.dart:89:7)
<asynchronous suspension>
#1 clientViaServiceAccount (package:googleapis_auth/auth_io.dart:200:30)
Since the response is structured like this
{
"id_token": "<JWT_TOKEN>"
}
with missing fields like token_type, expires_in and access_token.
I can find no way of using target audience. Am I missing something?