Credential.fromServiceAccountParams constructor

Credential.fromServiceAccountParams({
  1. required String clientId,
  2. required String privateKey,
  3. required String email,
})

Log in to firebase from a service account file parameters.

Implementation

factory Credential.fromServiceAccountParams({
  required String clientId,
  required String privateKey,
  required String email,
}) {
  final serviceAccountCredentials = auth.ServiceAccountCredentials(
    email,
    ClientId(clientId),
    privateKey,
  );

  return Credential._(serviceAccountCredentials);
}