FirebaseAuth Framework Reference

AuthErrorCode

@objc(FIRAuthErrorCode)publicenumAuthErrorCode:Int,Error

Error codes used by Firebase Auth.

  • Indicates a validation error with the custom token.

    Declaration

    Swift

    caseinvalidCustomToken=17000
  • Indicates the service account and the API key belong to different projects.

    Declaration

    Swift

    casecustomTokenMismatch=17002
  • Indicates the IDP token or requestUri is invalid.

    Declaration

    Swift

    caseinvalidCredential=17004
  • Indicates the user’s account is disabled on the server.

    Declaration

    Swift

    caseuserDisabled=17005
  • Indicates the administrator disabled sign in with the specified identity provider.

    Declaration

    Swift

    caseoperationNotAllowed=17006
  • Indicates the email used to attempt a sign up is already in use.

    Declaration

    Swift

    caseemailAlreadyInUse=17007
  • Indicates the email is invalid.

    Declaration

    Swift

    caseinvalidEmail=17008
  • Indicates the user attempted sign in with a wrong password.

    Declaration

    Swift

    casewrongPassword=17009
  • Indicates that too many requests were made to a server method.

    Declaration

    Swift

    casetooManyRequests=17010
  • Indicates the user account was not found.

    Declaration

    Swift

    caseuserNotFound=17011
  • Indicates account linking is required.

    Declaration

    Swift

    caseaccountExistsWithDifferentCredential=17012
  • Indicates the user has attempted to change email or password more than 5 minutes aftersigning in.

    Declaration

    Swift

    caserequiresRecentLogin=17014
  • Indicates an attempt to link a provider to which the account is already linked.

    Declaration

    Swift

    caseproviderAlreadyLinked=17015
  • Indicates an attempt to unlink a provider that is not linked.

    Declaration

    Swift

    casenoSuchProvider=17016
  • Indicates user’s saved auth credential is invalid the user needs to sign in again.

    Declaration

    Swift

    caseinvalidUserToken=17017
  • Indicates a network error occurred (such as a timeout interrupted connection orunreachable host). These types of errors are often recoverable with a retry. TheNSUnderlyingError field in theNSError.userInfo dictionary will contain the errorencountered.

    Declaration

    Swift

    casenetworkError=17020
  • Indicates the saved token has expired for example the user may have changed accountpassword on another device. The user needs to sign in again on the device that made thisrequest.

    Declaration

    Swift

    caseuserTokenExpired=17021
  • Indicates an invalid API key was supplied in the request.

    Declaration

    Swift

    caseinvalidAPIKey=17023
  • Indicates that an attempt was made to reauthenticate with a user which is not the currentuser.

    Declaration

    Swift

    caseuserMismatch=17024
  • Indicates an attempt to link with a credential that has already been linked with adifferent Firebase account.

    Declaration

    Swift

    casecredentialAlreadyInUse=17025
  • Indicates an attempt to set a password that is considered too weak.

    Declaration

    Swift

    caseweakPassword=17026
  • Indicates the App is not authorized to use Firebase Authentication with theprovided API Key.

    Declaration

    Swift

    caseappNotAuthorized=17028
  • Indicates the OOB code is expired.

    Declaration

    Swift

    caseexpiredActionCode=17029
  • Indicates the OOB code is invalid.

    Declaration

    Swift

    caseinvalidActionCode=17030
  • Indicates that there are invalid parameters in the payload during a“send password reset email” attempt.

    Declaration

    Swift

    caseinvalidMessagePayload=17031
  • Indicates that the sender email is invalid during a “send password reset email” attempt.

    Declaration

    Swift

    caseinvalidSender=17032
  • Indicates that the recipient email is invalid.

    Declaration

    Swift

    caseinvalidRecipientEmail=17033
  • Indicates that an email address was expected but one was not provided.

    Declaration

    Swift

    casemissingEmail=17034
  • Indicates that the iOS bundle ID is missing when a iOS App Store ID is provided.

    Declaration

    Swift

    casemissingIosBundleID=17036
  • Indicates that the android package name is missing when theandroidInstallApp flag is settotrue.

    Declaration

    Swift

    casemissingAndroidPackageName=17037
  • Indicates that the domain specified in the continue URL is not allowlisted in the Firebaseconsole.

    Declaration

    Swift

    caseunauthorizedDomain=17038
  • Indicates that the domain specified in the continue URI is not valid.

    Declaration

    Swift

    caseinvalidContinueURI=17039
  • Indicates that a continue URI was not provided in a request to the backend which requires one.

    Declaration

    Swift

    casemissingContinueURI=17040
  • Indicates that a phone number was not provided in a call toverifyPhoneNumber:completion:.

    Declaration

    Swift

    casemissingPhoneNumber=17041
  • Indicates that an invalid phone number was provided in a call toverifyPhoneNumber:completion:.

    Declaration

    Swift

    caseinvalidPhoneNumber=17042
  • Indicates that the phone auth credential was created with an empty verification code.

    Declaration

    Swift

    casemissingVerificationCode=17043
  • Indicates that an invalid verification code was used in the verifyPhoneNumber request.

    Declaration

    Swift

    caseinvalidVerificationCode=17044
  • Indicates that the phone auth credential was created with an empty verification ID.

    Declaration

    Swift

    casemissingVerificationID=17045
  • Indicates that an invalid verification ID was used in the verifyPhoneNumber request.

    Declaration

    Swift

    caseinvalidVerificationID=17046
  • Indicates that the APNS device token is missing in the verifyClient request.

    Declaration

    Swift

    casemissingAppCredential=17047
  • Indicates that an invalid APNS device token was used in the verifyClient request.

    Declaration

    Swift

    caseinvalidAppCredential=17048
  • Indicates that the SMS code has expired.

    Declaration

    Swift

    casesessionExpired=17051
  • Indicates that the quota of SMS messages for a given project has been exceeded.

    Declaration

    Swift

    casequotaExceeded=17052
  • Indicates that the APNs device token could not be obtained. The app may not have set upremote notification correctly or may fail to forward the APNs device token to Authif app delegate swizzling is disabled.

    Declaration

    Swift

    casemissingAppToken=17053
  • Indicates that the app fails to forward remote notification to FIRAuth.

    Declaration

    Swift

    casenotificationNotForwarded=17054
  • Indicates that the app could not be verified by Firebase during phone number authentication.

    Declaration

    Swift

    caseappNotVerified=17055
  • Indicates that the reCAPTCHA token is not valid.

    Declaration

    Swift

    casecaptchaCheckFailed=17056
  • Indicates that an attempt was made to present a new web context while one was already beingpresented.

    Declaration

    Swift

    casewebContextAlreadyPresented=17057
  • Indicates that the URL presentation was cancelled prematurely by the user.

    Declaration

    Swift

    casewebContextCancelled=17058
  • Indicates a general failure during the app verification flow.

    Declaration

    Swift

    caseappVerificationUserInteractionFailure=17059
  • Indicates that the clientID used to invoke a web flow is invalid.

    Declaration

    Swift

    caseinvalidClientID=17060
  • Indicates that a network request within a SFSafariViewController or WKWebView failed.

    Declaration

    Swift

    casewebNetworkRequestFailed=17061
  • Indicates that an internal error occurred within a SFSafariViewController or WKWebView.

    Declaration

    Swift

    casewebInternalError=17062
  • Indicates a general failure during a web sign-in flow.

    Declaration

    Swift

    casewebSignInUserInteractionFailure=17063
  • Indicates that the local player was not authenticated prior to attempting Game Center signin.

    Declaration

    Swift

    caselocalPlayerNotAuthenticated=17066
  • Indicates that a non-null user was expected as an argument to the operation but a nulluser was provided.

    Declaration

    Swift

    casenullUser=17067
  • Represents the error code for when the given provider id for a web operation is invalid.

    Declaration

    Swift

    caseinvalidProviderID=17071
  • Represents the error code for when an attempt is made to update the current user with atenantId that differs from the current FirebaseAuth instance’s tenantId.

    Declaration

    Swift

    casetenantIDMismatch=17072
  • Represents the error code for when a request is made to the backend with an associated tenantID for an operation that does not support multi-tenancy.

    Declaration

    Swift

    caseunsupportedTenantOperation=17073
  • Indicates that the provided Firebase Hosting Link domain is not owned by the current project.

    Declaration

    Swift

    caseinvalidHostingLinkDomain=17214
  • Indicates that the credential is rejected because it’s malformed or mismatching.

    Declaration

    Swift

    caserejectedCredential=17075
  • Indicates that the GameKit framework is not linked prior to attempting Game Center signin.

    Declaration

    Swift

    casegameKitNotLinked=17076
  • Indicates that the second factor is required for signin.

    Declaration

    Swift

    casesecondFactorRequired=17078
  • Indicates that the multi factor session is missing.

    Declaration

    Swift

    casemissingMultiFactorSession=17081
  • Indicates that the multi factor info is missing.

    Declaration

    Swift

    casemissingMultiFactorInfo=17082
  • Indicates that the multi factor session is invalid.

    Declaration

    Swift

    caseinvalidMultiFactorSession=17083
  • Indicates that the multi factor info is not found.

    Declaration

    Swift

    casemultiFactorInfoNotFound=17084
  • Indicates that the operation is admin restricted.

    Declaration

    Swift

    caseadminRestrictedOperation=17085
  • Indicates that the email is required for verification.

    Declaration

    Swift

    caseunverifiedEmail=17086
  • Indicates that the second factor is already enrolled.

    Declaration

    Swift

    casesecondFactorAlreadyEnrolled=17087
  • Indicates that the maximum second factor count is exceeded.

    Declaration

    Swift

    casemaximumSecondFactorCountExceeded=17088
  • Indicates that the first factor is not supported.

    Declaration

    Swift

    caseunsupportedFirstFactor=17089
  • Indicates that the a verified email is required to changed to.

    Declaration

    Swift

    caseemailChangeNeedsVerification=17090
  • Indicates that the request does not contain a client identifier.

    Declaration

    Swift

    casemissingClientIdentifier=17093
  • Indicates that the nonce is missing or invalid.

    Declaration

    Swift

    casemissingOrInvalidNonce=17094
  • Raised when a Cloud Function returns a blocking error. Will include a message returned fromthe function.

    Declaration

    Swift

    caseblockingCloudFunctionError=17105
  • Indicates that reCAPTCHA Enterprise integration is not enabled for this project.

    Declaration

    Swift

    caserecaptchaNotEnabled=17200
  • Indicates that the reCAPTCHA token is missing from the backend request.

    Declaration

    Swift

    casemissingRecaptchaToken=17201
  • Indicates that the reCAPTCHA token sent with the backend request is invalid.

    Declaration

    Swift

    caseinvalidRecaptchaToken=17202
  • Indicates that the requested reCAPTCHA action is invalid.

    Declaration

    Swift

    caseinvalidRecaptchaAction=17203
  • Indicates that the client type is missing from the request.

    Declaration

    Swift

    casemissingClientType=17204
  • Indicates that the reCAPTCHA version is missing from the request.

    Declaration

    Swift

    casemissingRecaptchaVersion=17205
  • Indicates that the reCAPTCHA version sent to the backend is invalid.

    Declaration

    Swift

    caseinvalidRecaptchaVersion=17206
  • Indicates that the request type sent to the backend is invalid.

    Declaration

    Swift

    caseinvalidReqType=17207
  • Indicates that the reCAPTCHA SDK is not linked to the app.

    Declaration

    Swift

    caserecaptchaSDKNotLinked=17208
  • Indicates that the reCAPTCHA SDK site key wasn’t found.

    Declaration

    Swift

    caserecaptchaSiteKeyMissing=17209
  • Indicates that the reCAPTCHA SDK actions class failed to create.

    Declaration

    Swift

    caserecaptchaActionCreationFailed=17210
  • Indicates an error occurred while attempting to access the keychain.

    Declaration

    Swift

    casekeychainError=17995
  • Indicates an internal error occurred.

    Declaration

    Swift

    caseinternalError=17999
  • Raised when a JWT fails to parse correctly. May be accompanied by an underlying errordescribing which step of the JWT parsing process failed.

    Declaration

    Swift

    casemalformedJWT=18000
  • The error code. It’s redundant but implemented for compatibility with the Objective-Cimplementation.

    Declaration

    Swift

    publicvarcode:`Self`{get}

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-15 UTC.