public class

GoogleAuthProvider

extends Object
java.lang.Object
   ↳ com.google.firebase.auth.GoogleAuthProvider

Class Overview

Represents the Google Sign-In authentication provider. Use this class to obtain GoogleAuthCredentials.

Summary

Constants
String PROVIDER_ID Unique string identifier for this provider type.
Public Methods
static AuthCredential getCredential(String idToken, String accessToken)
Returns a new instance of AuthCredential that wraps Google Sign-In ID or access tokens.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String PROVIDER_ID

Unique string identifier for this provider type.

Constant Value: "google.com"

Public Methods

public static AuthCredential getCredential (String idToken, String accessToken)

Returns a new instance of AuthCredential that wraps Google Sign-In ID or access tokens. Used when calling signInWithCredential(AuthCredential) or linkWithCredential(AuthCredential).

Both parameters are optional but at least one must be present.

Parameters
idToken String: a valid Google Sign-In id token, obtained from the Google Sign-In SDK
accessToken String: a valid Google Sign-In access token, obtained from the Google Sign-In SDK
Returns
AuthCredential