FirebaseAuth Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
Constants
The following constants are available globally.
-
@brief The name of the NSNotificationCenter
notification which is posted when the auth state
changes (for example, a new token has been produced, a user signs in or signs out). The
object parameter of the notification is the sender Auth
instance.
Declaration
Objective-C
extern NS_SWIFT_NAME(AuthStateDidChange) const NSNotificationName
FIRAuthStateDidChangeNotification
-
@brief The Firebase Auth error domain.
Declaration
Objective-C
extern NS_SWIFT_NAME(AuthErrorDomain) NSString *const FIRAuthErrorDomain
-
@brief The name of the key for the error short string of an error code.
Declaration
Objective-C
extern NS_SWIFT_NAME(AuthErrorUserInfoNameKey) NSString *const
FIRAuthErrorUserInfoNameKey
-
@brief Errors with one of the following three codes:
- AuthErrorCodeAccountExistsWithDifferentCredential
- AuthErrorCodeCredentialAlreadyInUse
- AuthErrorCodeEmailAlreadyInUse
may contain an NSError.userInfo
dictionary object which contains this key. The value
associated with this key is an NSString of the email address of the account that already
exists.
Declaration
Objective-C
extern NS_SWIFT_NAME(AuthErrorUserInfoEmailKey) NSString *const
FIRAuthErrorUserInfoEmailKey
-
@brief The key used to read the updated Auth credential from the userInfo dictionary of the
NSError object returned. This is the updated auth credential the developer should use for
recovery if applicable.
Declaration
Objective-C
extern NS_SWIFT_NAME(AuthErrorUserInfoUpdatedCredentialKey) NSString *const
FIRAuthErrorUserInfoUpdatedCredentialKey
-
@brief The key used to read the MFA resolver from the userInfo dictionary of the NSError object
returned when 2FA is required for sign-incompletion.
Declaration
Objective-C
extern NS_SWIFT_NAME(AuthErrorUserInfoMultiFactorResolverKey) NSString *const
FIRAuthErrorUserInfoMultiFactorResolverKey
-
@brief A string constant identifying the email & password identity provider.
Declaration
Objective-C
extern NS_SWIFT_NAME(EmailAuthProviderID) NSString *const FIREmailAuthProviderID
-
@brief A string constant identifying the email-link sign-in method.
Declaration
Objective-C
extern NS_SWIFT_NAME(EmailLinkAuthSignInMethod) NSString *const
FIREmailLinkAuthSignInMethod
-
@brief A string constant identifying the email & password sign-in method.
Declaration
Objective-C
extern NS_SWIFT_NAME(EmailPasswordAuthSignInMethod) NSString *const
FIREmailPasswordAuthSignInMethod
-
@brief A string constant identifying the Facebook identity provider.
Declaration
Objective-C
extern NS_SWIFT_NAME(FacebookAuthProviderID) NSString *const
FIRFacebookAuthProviderID
-
@brief A string constant identifying the Facebook sign-in method.
Declaration
Objective-C
extern NS_SWIFT_NAME(FacebookAuthSignInMethod) NSString *const
FIRFacebookAuthSignInMethod
-
@brief A string constant identifying the Game Center identity provider.
Declaration
Objective-C
extern NS_SWIFT_NAME(GameCenterAuthProviderID) NSString *const
FIRGameCenterAuthProviderID
-
@brief A string constant identifying the Game Center sign-in method.
Declaration
Objective-C
extern NS_SWIFT_NAME(
GameCenterAuthSignInMethod) NSString *const
FIRGameCenterAuthSignInMethod
-
@brief A string constant identifying the GitHub identity provider.
Declaration
Objective-C
extern NS_SWIFT_NAME(GitHubAuthProviderID) NSString *const
FIRGitHubAuthProviderID
-
@brief A string constant identifying the GitHub sign-in method.
Declaration
Objective-C
extern NS_SWIFT_NAME(GitHubAuthSignInMethod) NSString *const
FIRGitHubAuthSignInMethod
-
@brief A string constant identifying the Google identity provider.
Declaration
Objective-C
extern NS_SWIFT_NAME(GoogleAuthProviderID) NSString *const
FIRGoogleAuthProviderID
-
@brief A string constant identifying the Google sign-in method.
Declaration
Objective-C
extern NS_SWIFT_NAME(GoogleAuthSignInMethod) NSString *const
FIRGoogleAuthSignInMethod
-
@brief The string identifier for using phone as a second factor.
This constant is available on iOS only.
Declaration
Objective-C
extern NS_SWIFT_NAME(PhoneMultiFactorID) NSString *const FIRPhoneMultiFactorID
-
@brief The string identifier for using TOTP as a second factor.
This constant is available on iOS only.
Declaration
Objective-C
extern NS_SWIFT_NAME(TOTPMultiFactorID) NSString *const FIRTOTPMultiFactorID
-
@var FIRPhoneAuthProviderID
@brief A string constant identifying the phone identity provider.
This constant is available on iOS only.
Declaration
Objective-C
extern NS_SWIFT_NAME(PhoneAuthProviderID) NSString *const FIRPhoneAuthProviderID
-
@var FIRPhoneAuthProviderID
@brief A string constant identifying the phone sign-in method.
This constant is available on iOS only.
Declaration
Objective-C
extern NS_SWIFT_NAME(PhoneAuthSignInMethod) NSString *const
FIRPhoneAuthSignInMethod
-
@brief A string constant identifying the Twitter identity provider.
Declaration
Objective-C
extern NS_SWIFT_NAME(TwitterAuthProviderID) NSString *const
FIRTwitterAuthProviderID
-
@brief A string constant identifying the Twitter sign-in method.
Declaration
Objective-C
extern NS_SWIFT_NAME(TwitterAuthSignInMethod) NSString *const
FIRTwitterAuthSignInMethod
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-15 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-15 UTC."],[],[],null,["# FirebaseAuth Framework Reference\n\nConstants\n=========\n\nThe following constants are available globally.\n- `\n ``\n ``\n `\n\n ### [FIRAuthStateDidChangeNotification](#/c:@FIRAuthStateDidChangeNotification)\n\n `\n ` \n @brief The name of the `NSNotificationCenter` notification which is posted when the auth state\n changes (for example, a new token has been produced, a user signs in or signs out). The\n object parameter of the notification is the sender `Auth` instance. \n\n #### Declaration\n\n Objective-C \n\n extern NS_SWIFT_NAME(AuthStateDidChange) const NSNotificationName\n FIRAuthStateDidChangeNotification\n\n- `\n ``\n ``\n `\n\n ### [FIRAuthErrorDomain](#/c:@FIRAuthErrorDomain)\n\n `\n ` \n @brief The Firebase Auth error domain. \n\n #### Declaration\n\n Objective-C \n\n extern NS_SWIFT_NAME(AuthErrorDomain) NSString *const FIRAuthErrorDomain\n\n- `\n ``\n ``\n `\n\n ### [FIRAuthErrorUserInfoNameKey](#/c:@FIRAuthErrorUserInfoNameKey)\n\n `\n ` \n @brief The name of the key for the error short string of an error code. \n\n #### Declaration\n\n Objective-C \n\n extern NS_SWIFT_NAME(AuthErrorUserInfoNameKey) NSString *const\n FIRAuthErrorUserInfoNameKey\n\n- `\n ``\n ``\n `\n\n ### [FIRAuthErrorUserInfoEmailKey](#/c:@FIRAuthErrorUserInfoEmailKey)\n\n `\n ` \n @brief Errors with one of the following three codes:\n - `AuthErrorCodeAccountExistsWithDifferentCredential`\n - `AuthErrorCodeCredentialAlreadyInUse`\n - `AuthErrorCodeEmailAlreadyInUse`\n may contain an `NSError.userInfo` dictionary object which contains this key. The value\n associated with this key is an NSString of the email address of the account that already\n exists. \n\n #### Declaration\n\n Objective-C \n\n extern NS_SWIFT_NAME(AuthErrorUserInfoEmailKey) NSString *const\n FIRAuthErrorUserInfoEmailKey\n\n- `\n ``\n ``\n `\n\n ### [FIRAuthErrorUserInfoUpdatedCredentialKey](#/c:@FIRAuthErrorUserInfoUpdatedCredentialKey)\n\n `\n ` \n @brief The key used to read the updated Auth credential from the userInfo dictionary of the\n NSError object returned. This is the updated auth credential the developer should use for\n recovery if applicable. \n\n #### Declaration\n\n Objective-C \n\n extern NS_SWIFT_NAME(AuthErrorUserInfoUpdatedCredentialKey) NSString *const\n FIRAuthErrorUserInfoUpdatedCredentialKey\n\n- `\n ``\n ``\n `\n\n ### [FIRAuthErrorUserInfoMultiFactorResolverKey](#/c:@FIRAuthErrorUserInfoMultiFactorResolverKey)\n\n `\n ` \n @brief The key used to read the MFA resolver from the userInfo dictionary of the NSError object\n returned when 2FA is required for sign-incompletion. \n\n #### Declaration\n\n Objective-C \n\n extern NS_SWIFT_NAME(AuthErrorUserInfoMultiFactorResolverKey) NSString *const\n FIRAuthErrorUserInfoMultiFactorResolverKey\n\n- `\n ``\n ``\n `\n\n ### [FIREmailAuthProviderID](#/c:@FIREmailAuthProviderID)\n\n `\n ` \n @brief A string constant identifying the email \\& password identity provider. \n\n #### Declaration\n\n Objective-C \n\n extern NS_SWIFT_NAME(EmailAuthProviderID) NSString *const FIREmailAuthProviderID\n\n- `\n ``\n ``\n `\n\n ### [FIREmailLinkAuthSignInMethod](#/c:@FIREmailLinkAuthSignInMethod)\n\n `\n ` \n @brief A string constant identifying the email-link sign-in method. \n\n #### Declaration\n\n Objective-C \n\n extern NS_SWIFT_NAME(EmailLinkAuthSignInMethod) NSString *const\n FIREmailLinkAuthSignInMethod\n\n- `\n ``\n ``\n `\n\n ### [FIREmailPasswordAuthSignInMethod](#/c:@FIREmailPasswordAuthSignInMethod)\n\n `\n ` \n @brief A string constant identifying the email \\& password sign-in method. \n\n #### Declaration\n\n Objective-C \n\n extern NS_SWIFT_NAME(EmailPasswordAuthSignInMethod) NSString *const\n FIREmailPasswordAuthSignInMethod\n\n- `\n ``\n ``\n `\n\n ### [FIRFacebookAuthProviderID](#/c:@FIRFacebookAuthProviderID)\n\n `\n ` \n @brief A string constant identifying the Facebook identity provider. \n\n #### Declaration\n\n Objective-C \n\n extern NS_SWIFT_NAME(FacebookAuthProviderID) NSString *const\n FIRFacebookAuthProviderID\n\n- `\n ``\n ``\n `\n\n ### [FIRFacebookAuthSignInMethod](#/c:@FIRFacebookAuthSignInMethod)\n\n `\n ` \n @brief A string constant identifying the Facebook sign-in method. \n\n #### Declaration\n\n Objective-C \n\n extern NS_SWIFT_NAME(FacebookAuthSignInMethod) NSString *const\n FIRFacebookAuthSignInMethod\n\n- `\n ``\n ``\n `\n\n ### [FIRGameCenterAuthProviderID](#/c:@FIRGameCenterAuthProviderID)\n\n `\n ` \n @brief A string constant identifying the Game Center identity provider. \n\n #### Declaration\n\n Objective-C \n\n extern NS_SWIFT_NAME(GameCenterAuthProviderID) NSString *const\n FIRGameCenterAuthProviderID\n\n- `\n ``\n ``\n `\n\n ### [FIRGameCenterAuthSignInMethod](#/c:@FIRGameCenterAuthSignInMethod)\n\n `\n ` \n @brief A string constant identifying the Game Center sign-in method. \n\n #### Declaration\n\n Objective-C \n\n extern NS_SWIFT_NAME(\n GameCenterAuthSignInMethod) NSString *const\n FIRGameCenterAuthSignInMethod\n\n- `\n ``\n ``\n `\n\n ### [FIRGitHubAuthProviderID](#/c:@FIRGitHubAuthProviderID)\n\n `\n ` \n @brief A string constant identifying the GitHub identity provider. \n\n #### Declaration\n\n Objective-C \n\n extern NS_SWIFT_NAME(GitHubAuthProviderID) NSString *const\n FIRGitHubAuthProviderID\n\n- `\n ``\n ``\n `\n\n ### [FIRGitHubAuthSignInMethod](#/c:@FIRGitHubAuthSignInMethod)\n\n `\n ` \n @brief A string constant identifying the GitHub sign-in method. \n\n #### Declaration\n\n Objective-C \n\n extern NS_SWIFT_NAME(GitHubAuthSignInMethod) NSString *const\n FIRGitHubAuthSignInMethod\n\n- `\n ``\n ``\n `\n\n ### [FIRGoogleAuthProviderID](#/c:@FIRGoogleAuthProviderID)\n\n `\n ` \n @brief A string constant identifying the Google identity provider. \n\n #### Declaration\n\n Objective-C \n\n extern NS_SWIFT_NAME(GoogleAuthProviderID) NSString *const\n FIRGoogleAuthProviderID\n\n- `\n ``\n ``\n `\n\n ### [FIRGoogleAuthSignInMethod](#/c:@FIRGoogleAuthSignInMethod)\n\n `\n ` \n @brief A string constant identifying the Google sign-in method. \n\n #### Declaration\n\n Objective-C \n\n extern NS_SWIFT_NAME(GoogleAuthSignInMethod) NSString *const\n FIRGoogleAuthSignInMethod\n\n- `\n ``\n ``\n `\n\n ### [FIRPhoneMultiFactorID](#/c:@FIRPhoneMultiFactorID)\n\n `\n ` \n @brief The string identifier for using phone as a second factor.\n This constant is available on iOS only. \n\n #### Declaration\n\n Objective-C \n\n extern NS_SWIFT_NAME(PhoneMultiFactorID) NSString *const FIRPhoneMultiFactorID\n\n- `\n ``\n ``\n `\n\n ### [FIRTOTPMultiFactorID](#/c:@FIRTOTPMultiFactorID)\n\n `\n ` \n @brief The string identifier for using TOTP as a second factor.\n This constant is available on iOS only. \n\n #### Declaration\n\n Objective-C \n\n extern NS_SWIFT_NAME(TOTPMultiFactorID) NSString *const FIRTOTPMultiFactorID\n\n- `\n ``\n ``\n `\n\n ### [FIRPhoneAuthProviderID](#/c:@FIRPhoneAuthProviderID)\n\n `\n ` \n @var FIRPhoneAuthProviderID\n @brief A string constant identifying the phone identity provider.\n This constant is available on iOS only. \n\n #### Declaration\n\n Objective-C \n\n extern NS_SWIFT_NAME(PhoneAuthProviderID) NSString *const FIRPhoneAuthProviderID\n\n- `\n ``\n ``\n `\n\n ### [FIRPhoneAuthSignInMethod](#/c:@FIRPhoneAuthSignInMethod)\n\n `\n ` \n @var FIRPhoneAuthProviderID\n @brief A string constant identifying the phone sign-in method.\n This constant is available on iOS only. \n\n #### Declaration\n\n Objective-C \n\n extern NS_SWIFT_NAME(PhoneAuthSignInMethod) NSString *const\n FIRPhoneAuthSignInMethod\n\n- `\n ``\n ``\n `\n\n ### [FIRTwitterAuthProviderID](#/c:@FIRTwitterAuthProviderID)\n\n `\n ` \n @brief A string constant identifying the Twitter identity provider. \n\n #### Declaration\n\n Objective-C \n\n extern NS_SWIFT_NAME(TwitterAuthProviderID) NSString *const\n FIRTwitterAuthProviderID\n\n- `\n ``\n ``\n `\n\n ### [FIRTwitterAuthSignInMethod](#/c:@FIRTwitterAuthSignInMethod)\n\n `\n ` \n @brief A string constant identifying the Twitter sign-in method. \n\n #### Declaration\n\n Objective-C \n\n extern NS_SWIFT_NAME(TwitterAuthSignInMethod) NSString *const\n FIRTwitterAuthSignInMethod"]]