Represents the Google Sign-In authentication provider. Use this class to obtain
GoogleAuthCredential
s.
Constant Summary
String | GOOGLE_SIGN_IN_METHOD | Unique string identifier for Google sign-in method. |
String | PROVIDER_ID | Unique string identifier for this provider type. |
Public Method Summary
static AuthCredential |
getCredential(String idToken,
String
accessToken)
Returns a new instance of
AuthCredential
that wraps Google Sign-In ID or access tokens.
|
Inherited Method Summary
Constants
public static final String GOOGLE_SIGN_IN_METHOD
Unique string identifier for Google sign-in method.
public static final String PROVIDER_ID
Unique string identifier for this provider type.
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
FirebaseAuth.signInWithCredential(AuthCredential)
or
FirebaseUser.linkWithCredential(AuthCredential)
.
Both parameters are optional but at least one must be present.
Parameters
idToken | a valid Google Sign-In id token, obtained from the Google Sign-In SDK |
---|---|
accessToken | a valid Google Sign-In access token, obtained from the Google Sign-In SDK |