OAuthProvider

class OAuthProvider : NSObject, FederatedAuthProvider

A concrete implementation of FIRAuthProvider for generic OAuth Providers.

  • Array used to configure the OAuth scopes.

    Declaration

    Swift

    var scopes: [String]? { get set }
  • Dictionary used to configure the OAuth custom parameters.

    Declaration

    Swift

    var customParameters: [String : String]? { get set }
  • The provider ID indicating the specific OAuth provider this OAuthProvider instance represents.

    Declaration

    Swift

    var providerID: String { get }
  • Declaration

    Swift

    /*not inherited*/ init(providerID: String)

    Parameters

    providerID

    The provider ID of the IDP for which this auth provider instance will be configured.

    Return Value

    An instance of FIROAuthProvider corresponding to the specified provider ID.

  • Declaration

    Swift

    /*not inherited*/ init(providerID: String, auth: FIRAuth)

    Parameters

    providerID

    The provider ID of the IDP for which this auth provider instance will be configured.

    auth

    The auth instance to be associated with the FIROAuthProvider instance.

    Return Value

    An instance of FIROAuthProvider corresponding to the specified provider ID.

  • Creates an FIRAuthCredential for that OAuth 2 provider identified by providerID, ID token and access token.

    Declaration

    Swift

    class func credential(withProviderID providerID: String, idToken IDToken: String, accessToken: String?) -> FIROAuthCredential

    Parameters

    providerID

    The provider ID associated with the Auth credential being created.

    IDToken

    The IDToken associated with the Auth credential being created.

    accessToken

    The accessstoken associated with the Auth credential be created, if available.

    Return Value

    A FIRAuthCredential for the specified provider ID, ID token and access token.

  • Creates an FIRAuthCredential for that OAuth 2 provider identified by providerID using an ID token.

    Declaration

    Swift

    class func credential(withProviderID providerID: String, accessToken: String) -> FIROAuthCredential

    Parameters

    providerID

    The provider ID associated with the Auth credential being created.

    accessToken

    The accessstoken associated with the Auth credential be created

    Return Value

    A FIRAuthCredential.

  • This class is not meant to be initialized.