diff --git a/FirebaseAuth/Sources/Backend/FIRAuthBackend.m b/FirebaseAuth/Sources/Backend/FIRAuthBackend.m index 0b5669e8452..0ee39aba877 100644 --- a/FirebaseAuth/Sources/Backend/FIRAuthBackend.m +++ b/FirebaseAuth/Sources/Backend/FIRAuthBackend.m @@ -1410,7 +1410,8 @@ + (nullable NSError *)clientErrorWithServerErrorMessage:(NSString *)serverErrorM } if ([shortErrorMessage isEqualToString:kInvalidCredentialErrorMessage] || - [shortErrorMessage isEqualToString:kInvalidPendingToken]) { + [shortErrorMessage isEqualToString:kInvalidPendingToken] || + [shortErrorMessage isEqualToString:kInvalidLoginCredentials]) { return [FIRAuthErrorUtils invalidCredentialErrorWithMessage:serverDetailErrorMessage]; } @@ -1647,11 +1648,6 @@ + (nullable NSError *)clientErrorWithServerErrorMessage:(NSString *)serverErrorM message:serverErrorMessage]; } - if ([shortErrorMessage isEqualToString:kInvalidLoginCredentials]) { - return [FIRAuthErrorUtils errorWithCode:FIRAuthInternalErrorCodeInvalidLoginCredentials - message:serverErrorMessage]; - } - // In this case we handle an error that might be specified in the underlying errors dictionary, // the error message in determined based on the @c reason key in the dictionary. if (errorDictionary[kErrorsKey]) { diff --git a/FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuth.h b/FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuth.h index 071259a3c42..029e5c447fa 100644 --- a/FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuth.h +++ b/FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuth.h @@ -402,7 +402,7 @@ NS_SWIFT_NAME(Auth) /** @fn signInWithEmail:password:completion: @brief Signs in using an email address and password. When [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) - is enabled, this method fails with FIRAuthErrorCodeInvalidLoginCredentials in case of an invalid + is enabled, this method fails with FIRAuthErrorCodeInvalidCredentials in case of an invalid email/password. @param email The user's email address. diff --git a/FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuthErrors.h b/FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuthErrors.h index f5b09d41b86..d6bfa44979f 100644 --- a/FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuthErrors.h +++ b/FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuthErrors.h @@ -458,10 +458,6 @@ typedef NS_ERROR_ENUM(FIRAuthErrorDomain, FIRAuthErrorCode){ */ FIRAuthErrorCodeRecaptchaSDKNotLinked = 17208, - /** Indicates that the login credentials is invalid. - */ - FIRAuthErrorCodeInvalidLoginCredentials = 17213, - /** Indicates an error occurred while attempting to access the keychain. */ FIRAuthErrorCodeKeychainError = 17995, diff --git a/FirebaseAuth/Sources/Public/FirebaseAuth/FIRUser.h b/FirebaseAuth/Sources/Public/FirebaseAuth/FIRUser.h index fe4d82ce025..e78918d68e2 100644 --- a/FirebaseAuth/Sources/Public/FirebaseAuth/FIRUser.h +++ b/FirebaseAuth/Sources/Public/FirebaseAuth/FIRUser.h @@ -132,7 +132,7 @@ NS_SWIFT_NAME(User) /** @fn updateEmail:completion: @brief Updates the email address for the user. On success, the cached user profile data is - updated. Throws FIRAuthErrorCodeInvalidLoginCredentials error when [Email Enumeration + updated. Throws FIRAuthErrorCodeInvalidCredentials error when [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) is enabled. @remarks May fail if there is already an account with this email address that was created using diff --git a/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.m b/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.m index 4689ce59a9c..5eb531b749d 100644 --- a/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.m +++ b/FirebaseAuth/Sources/Utilities/FIRAuthErrorUtils.m @@ -814,8 +814,6 @@ return kFIRAuthErrorMessageInvalidReqType; case FIRAuthErrorCodeRecaptchaSDKNotLinked: return kFIRAuthErrorMessageRecaptchaSDKNotLinked; - case FIRAuthErrorCodeInvalidLoginCredentials: - return kFIRAuthErrorMessageInvalidLoginCredentials; } } @@ -1003,8 +1001,6 @@ return @"ERROR_INVALID_REQ_TYPE"; case FIRAuthErrorCodeRecaptchaSDKNotLinked: return @"ERROR_RECAPTCHA_SDK_NOT_LINKED"; - case FIRAuthErrorCodeInvalidLoginCredentials: - return @"ERROR_INVALID_LOGIN_CREDENTIALS"; } } diff --git a/FirebaseAuth/Sources/Utilities/FIRAuthInternalErrors.h b/FirebaseAuth/Sources/Utilities/FIRAuthInternalErrors.h index 832663c324b..82b99b6487d 100644 --- a/FirebaseAuth/Sources/Utilities/FIRAuthInternalErrors.h +++ b/FirebaseAuth/Sources/Utilities/FIRAuthInternalErrors.h @@ -497,11 +497,6 @@ typedef NS_ENUM(NSInteger, FIRAuthInternalErrorCode) { FIRAuthInternalErrorCodeRecaptchaNotEnabled = FIRAuthPublicErrorCodeFlag | FIRAuthErrorCodeRecaptchaNotEnabled, - /** Indicates that the login credentials is invalid. - */ - FIRAuthInternalErrorCodeInvalidLoginCredentials = FIRAuthPublicErrorCodeFlag | - FIRAuthErrorCodeInvalidLoginCredentials, - /** Indicates that the recaptcha sdk is not linked to the app. */ FIRAuthInternalErrorCodeRecaptchaSDKNotLinked = FIRAuthPublicErrorCodeFlag |