adc library
An AdminCredential from Application Default Credentials, for servers and command line tools on Google
Cloud. Needs dart:io: import this library only in code that does not run on the web.
import 'package:firebase_admin_dart/adc.dart';
import 'package:firebase_admin_dart/auth.dart';
final FirebaseAdminApp app = FirebaseAdminApp(
projectId: 'my-project',
credential: applicationDefaultCredential(),
);
Functions
-
applicationDefaultCredential(
{String? serviceAccountEmail, String? quotaProjectId, Client? httpClient}) → AdminCredential -
AdminCredential.iam on top of Application Default Credentials (
applicationDefaultCredentialsoffirebase_auth_providers_dart, which looks upGOOGLE_APPLICATION_CREDENTIALS, the credentials ofgcloud auth application-default loginand the metadata server, in that order).