diff options
author | 2018-04-29 19:29:48 -0700 | |
---|---|---|
committer | 2018-04-29 19:29:48 -0700 | |
commit | 22a943708d156712a97d29dcd11ee903cb9d8494 (patch) | |
tree | 918aa3254d408010679b415b5cbe6fb2866d6cea /Firebase/Auth/Source/RPCs/FIRAuthBackend.m | |
parent | 1476e2bfe5db393ac3b069c1e12d14f91f6b529b (diff) |
Adds phone auth testing. (disableAppVerification) (#1192)
Diffstat (limited to 'Firebase/Auth/Source/RPCs/FIRAuthBackend.m')
-rw-r--r-- | Firebase/Auth/Source/RPCs/FIRAuthBackend.m | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Firebase/Auth/Source/RPCs/FIRAuthBackend.m b/Firebase/Auth/Source/RPCs/FIRAuthBackend.m index e380e34..ff8f2f0 100644 --- a/Firebase/Auth/Source/RPCs/FIRAuthBackend.m +++ b/Firebase/Auth/Source/RPCs/FIRAuthBackend.m @@ -350,6 +350,13 @@ static NSString *const kQuoutaExceededErrorMessage = @"QUOTA_EXCEEDED"; */ static NSString *const kAppNotVerifiedErrorMessage = @"APP_NOT_VERIFIED"; +/** @var kMissingClientIdentifier + @brief This is the error message the server will respond with if Firebase could not verify the + app during a phone authentication flow when a real phone number is used and app verification + is disabled for testing. + */ +static NSString *const kMissingClientIdentifier = @"MISSING_CLIENT_IDENTIFIER"; + /** @var kCaptchaCheckFailedErrorMessage @brief This is the error message the server will respond with if the reCAPTCHA token provided is invalid. @@ -1073,6 +1080,13 @@ static id<FIRAuthBackendImplementation> gBackendImplementation; return [FIRAuthErrorUtils appNotVerifiedErrorWithMessage:serverErrorMessage]; } + if ([shortErrorMessage isEqualToString:kMissingClientIdentifier]) { + return [FIRAuthErrorUtils appNotVerifiedErrorWithMessage:@"Missing app verification via" + " reCAPTCHA or APNS token. Please verify that appVerificationDisabledForTesting is not" + " enabled when testing with a phone number that is not marked as a test Phone number in the" + " app console."]; + } + if ([shortErrorMessage isEqualToString:kCaptchaCheckFailedErrorMessage]) { return [FIRAuthErrorUtils captchaCheckFailedErrorWithMessage:serverErrorMessage]; } |