Ir a la consola

OAuthProvider

public class OAuthProvider extends FederatedAuthProvider

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

Public Method Summary

static AuthCredential
getCredential(String providerId, String idToken, String accessToken)
Returns a new instance of AuthCredential that wraps a login token.
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.

Inherited Method Summary

Public Methods

public static AuthCredential getCredential (String providerId, String idToken, String accessToken)

Returns a new instance of AuthCredential that wraps a login token. Used when calling signInWithCredential(AuthCredential) or linkWithCredential(AuthCredential).

Parameters
providerId
idToken
accessToken a valid Facebook Login access token, obtained from the Facebook Login SDK

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.