credential static method
Creates a GoogleAuthCredential.
idToken Optional ID token.
accessToken Optional access token.
At least one token must be provided.
Returns a GoogleAuthCredential instance.
Throws AssertionError if both tokens are null.
Example:
final cred = GoogleAuthProvider.credential(idToken: 'google_id_token');
Implementation
static GoogleAuthCredential credential({String? idToken, String? accessToken}) {
assert(accessToken != null || idToken != null, 'Tokens cannot be null!');
return GoogleAuthCredential(
idToken: idToken,
accessToken: accessToken);
}