FirebaseServiceAccountCredentials class final

Contains information about the Firebase service account credentials.

The service account JSON file can be downloaded from the Firebase console under Project Settings > Service Accounts > Generate new private key.

For Firebase ID token verification, only the projectId is strictly required to validate the audience claim.

Constructors

FirebaseServiceAccountCredentials({required String projectId, String? clientEmail})
Creates a new instance with just the project ID.
const
FirebaseServiceAccountCredentials.fromJson(Map<String, dynamic> json)
Creates a new instance of FirebaseServiceAccountCredentials from a JSON map.
factory
FirebaseServiceAccountCredentials.fromJsonFile(File file)
Creates a new instance of FirebaseServiceAccountCredentials from a JSON file.
factory
FirebaseServiceAccountCredentials.fromJsonString(String jsonString)
Creates a new instance of FirebaseServiceAccountCredentials from a JSON string.
factory

Properties

clientEmail → String?
The service account client email.
final
hashCode → int
The hash code for this object.
no setterinherited
projectId → String
The Firebase project identifier.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited