wif_workaround 0.1.1
wif_workaround: ^0.1.1 copied to clipboard
A workaround to use Workload Identity Federation with googleapis_auth, calls gcloud CLI to get the access token.
import 'package:gcloud/pubsub.dart';
import 'package:wif_workaround/wif_workaround.dart' as w;
Future<void> main() async {
final pubsub = PubSub(
// Add 'w.' before your normal call.
await w.clientViaApplicationDefaultCredentials(scopes: PubSub.SCOPES),
'my-project-id',
);
// ...
}