Represents the login authentication provider for a generic OAuth2 provider. Use this class
to obtain AuthCredentials
.
Nested Class Summary
class | OAuthProvider.Builder | Class used to create instances of OAuthProvider . |
|
class | OAuthProvider.CredentialBuilder | Builder class to initialize AuthCredential 's. |
Public Method Summary
static AuthCredential |
getCredential(String providerId,
String
idToken, String accessToken)
This method is deprecated. Please use
newCredentialBuilder(String) instead
|
String |
getProviderId()
Returns the provider ID with which this OAuthProvider is associated.
|
static OAuthProvider.Builder |
newBuilder(String providerId,
FirebaseAuth
firebaseAuth)
Returns a
OAuthProvider.Builder
used to construct a OAuthProvider
instantiated with the given providerId .
|
static OAuthProvider.Builder |
newBuilder(String providerId)
Returns a
OAuthProvider.Builder
used to construct a OAuthProvider
instantiated with the given providerId .
|
static OAuthProvider.CredentialBuilder |
newCredentialBuilder(String providerId)
Creates an
OAuthProvider.CredentialBuilder for the specified provider ID.
|
Inherited Method Summary
Public Methods
public static AuthCredential getCredential (String providerId, String idToken, String accessToken)
This method is deprecated.
Please use
newCredentialBuilder(String)
instead
Returns a new instance of AuthCredential
that wraps a login token. Used when calling
signInWithCredential(AuthCredential)
or
linkWithCredential(AuthCredential)
.
public String getProviderId ()
Returns the provider ID with which this OAuthProvider is associated.
public static OAuthProvider.Builder newBuilder (String providerId, FirebaseAuth firebaseAuth)
Returns a OAuthProvider.Builder
used to construct a OAuthProvider
instantiated with the given providerId
. Uses the specified FirebaseAuth
instance.
public static OAuthProvider.Builder newBuilder (String providerId)
Returns a OAuthProvider.Builder
used to construct a OAuthProvider
instantiated with the given providerId
.
public static OAuthProvider.CredentialBuilder newCredentialBuilder (String providerId)
Creates an
OAuthProvider.CredentialBuilder
for the specified provider ID.
Throws
IllegalArgumentException | if providerId is null or empty |
---|