aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firebase/Auth/Source/RPCs/FIRAuthBackend.m
diff options
context:
space:
mode:
authorGravatar Xiangtian Dai <xiangtian@google.com>2017-08-11 17:12:11 -0700
committerGravatar GitHub <noreply@github.com>2017-08-11 17:12:11 -0700
commit8c3ef6b780d5b9b116c693b3b440dcc7f68b4827 (patch)
tree1c53f866e945324acd7fff5b93e77abb6333d994 /Firebase/Auth/Source/RPCs/FIRAuthBackend.m
parent6b0739790c637baf2e05b4bc339abb27cfb4f8cb (diff)
Handles MISSING_EMAIL error from server. (#187)
Diffstat (limited to 'Firebase/Auth/Source/RPCs/FIRAuthBackend.m')
-rw-r--r--Firebase/Auth/Source/RPCs/FIRAuthBackend.m10
1 files changed, 10 insertions, 0 deletions
diff --git a/Firebase/Auth/Source/RPCs/FIRAuthBackend.m b/Firebase/Auth/Source/RPCs/FIRAuthBackend.m
index 2cfa516..8eca6d5 100644
--- a/Firebase/Auth/Source/RPCs/FIRAuthBackend.m
+++ b/Firebase/Auth/Source/RPCs/FIRAuthBackend.m
@@ -234,6 +234,12 @@ static NSString *const kExpiredActionCodeErrorMessage = @"EXPIRED_OOB_CODE";
*/
static NSString *const kInvalidActionCodeErrorMessage = @"INVALID_OOB_CODE";
+/** @var kMissingEmailErrorMessage
+ @brief This is the error message the server will respond with if the email address is missing
+ during a "send password reset email" attempt.
+ */
+static NSString *const kMissingEmailErrorMessage = @"MISSING_EMAIL";
+
/** @var kInvalidSenderEmailErrorMessage
@brief This is the error message the server will respond with if the sender email is invalid
during a "send password reset email" attempt.
@@ -936,6 +942,10 @@ static id<FIRAuthBackendImplementation> gBackendImplementation;
return [FIRAuthErrorUtils invalidActionCodeErrorWithMessage:serverDetailErrorMessage];
}
+ if ([shortErrorMessage isEqualToString:kMissingEmailErrorMessage]) {
+ return [FIRAuthErrorUtils missingEmailErrorWithMessage:serverDetailErrorMessage];
+ }
+
if ([shortErrorMessage isEqualToString:kInvalidSenderEmailErrorMessage]) {
return [FIRAuthErrorUtils invalidSenderErrorWithMessage:serverDetailErrorMessage];
}