googleapis_auth
googleapis_auth copied to clipboard
Refactor Platform.environment call in MetadataServerAuthorizationFlow for Node.js usage
One meaningful use-case platform is Node.js (eg. calling google arbitrary Google APIs using Firebase Functions interop library). It would be nice to be able to call clientFromMetadataServer in these Cloud Functions, which seems precluded only by the following line in MetadataServerAuthorizationFlow:
final metadataHost = Platform.environment[_GCE_METADATA_HOST_ENV_VAR] ??
_DEFAULT_METADATA_HOST;
Is it possible to protect the Platform.environment call so that this function doesn't error on Node?