FirebaseAuth Framework Reference

FIROAuthProvider


@interface FIROAuthProvider : NSObject <FIRFederatedAuthProvider>

A concrete implementation of AuthProvider for generic OAuth Providers.

  • Array used to configure the OAuth scopes.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSArray<NSString *> *scopes;
  • Dictionary used to configure the OAuth custom parameters.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSDictionary<NSString *, NSString *> *customParameters;
  • The provider ID indicating the specific OAuth provider this OAuthProvider instance represents.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull providerID;
  • Declaration

    Objective-C

    + (nonnull FIROAuthProvider *)providerWithProviderID:
        (nonnull NSString *)providerID;

    Parameters

    providerID

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

    Return Value

    An instance of OAuthProvider corresponding to the specified provider ID.

  • Declaration

    Objective-C

    + (nonnull FIROAuthProvider *)providerWithProviderID:
                                      (nonnull NSString *)providerID
                                                    auth:(nonnull FIRAuth *)auth;

    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 OAuthProvider instance.

    Return Value

    An instance of OAuthProvider corresponding to the specified provider ID.

  • Creates an AuthCredential for the OAuth 2 provider identified by provider ID, ID token, and access token.

    Declaration

    Objective-C

    + (nonnull FIROAuthCredential *)
        credentialWithProviderID:(nonnull NSString *)providerID
                         IDToken:(nonnull NSString *)IDToken
                     accessToken:(nullable NSString *)accessToken;

    Parameters

    providerID

    The provider ID associated with the Auth credential being created.

    IDToken

    The IDToken associated with the Auth credential being created.

    accessToken

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

    Return Value

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

  • Creates an AuthCredential for the OAuth 2 provider identified by provider ID using an ID token.

    Declaration

    Objective-C

    + (nonnull FIROAuthCredential *)
        credentialWithProviderID:(nonnull NSString *)providerID
                     accessToken:(nonnull NSString *)accessToken;

    Parameters

    providerID

    The provider ID associated with the Auth credential being created.

    accessToken

    The access token associated with the Auth credential be created

    Return Value

    An AuthCredential.

  • Creates an AuthCredential for that OAuth 2 provider identified by provider ID, ID token, raw nonce, and access token.

    Declaration

    Objective-C

    + (nonnull FIROAuthCredential *)
        credentialWithProviderID:(nonnull NSString *)providerID
                         IDToken:(nonnull NSString *)IDToken
                        rawNonce:(nullable NSString *)rawNonce
                     accessToken:(nullable NSString *)accessToken;

    Parameters

    providerID

    The provider ID associated with the Auth credential being created.

    IDToken

    The IDToken associated with the Auth credential being created.

    rawNonce

    The raw nonce associated with the Auth credential being created.

    accessToken

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

    Return Value

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

  • Creates an AuthCredential for that OAuth 2 provider identified by providerID using an ID token and raw nonce.

    Declaration

    Objective-C

    + (nonnull FIROAuthCredential *)
        credentialWithProviderID:(nonnull NSString *)providerID
                         IDToken:(nonnull NSString *)IDToken
                        rawNonce:(nullable NSString *)rawNonce;

    Parameters

    providerID

    The provider ID associated with the Auth credential being created.

    IDToken

    The IDToken associated with the Auth credential being created.

    rawNonce

    The raw nonce associated with the Auth credential being created.

    Return Value

    A AuthCredential.

  • Creates an AuthCredential for the Sign in with Apple OAuth 2 provider identified by ID token, raw nonce, and full name. This method is specific to the Sign in with Apple OAuth 2 provider as this provider requires the full name to be passed explicitly.

    Declaration

    Objective-C

    + (nonnull FIROAuthCredential *)
        appleCredentialWithIDToken:(nonnull NSString *)IDToken
                          rawNonce:(nullable NSString *)rawNonce
                          fullName:(nullable NSPersonNameComponents *)fullName;

    Parameters

    IDToken

    The IDToken associated with the Sign in with Apple Auth credential being created.

    rawNonce

    The raw nonce associated with the Sign in with Apple Auth credential being created.

    fullName

    The full name associated with the Sign in with Apple Auth credential being created.

    Return Value

    An AuthCredential.

  • This class is not meant to be initialized.

    Declaration

    Objective-C

    - (nonnull instancetype)init;