GoogleAuthProvider

public class GoogleAuthProvider


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

Summary

Constants

static final String
GOOGLE_SIGN_IN_METHOD = "google.com"

Unique string identifier for Google sign-in method.

static final String
PROVIDER_ID = "google.com"

Unique string identifier for this provider type.

Public methods

static @NonNull AuthCredential
getCredential(@Nullable String idToken, @Nullable String accessToken)

Returns a new instance of AuthCredential that wraps Google Sign-In ID or access tokens.

Constants

GOOGLE_SIGN_IN_METHOD

public static final String GOOGLE_SIGN_IN_METHOD = "google.com"

Unique string identifier for Google sign-in method.

PROVIDER_ID

public static final String PROVIDER_ID = "google.com"

Unique string identifier for this provider type.

Public methods

getCredential

public static @NonNull AuthCredential getCredential(@Nullable String idToken, @Nullable String accessToken)

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

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

Parameters
@Nullable String idToken

a valid Google Sign-In id token, obtained from the Google Sign-In SDK

@Nullable String accessToken

a valid Google Sign-In access token, obtained from the Google Sign-In SDK