diff options
Diffstat (limited to 'Firebase/Auth/Source/Public/FIRPhoneAuthProvider.h')
-rw-r--r-- | Firebase/Auth/Source/Public/FIRPhoneAuthProvider.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Firebase/Auth/Source/Public/FIRPhoneAuthProvider.h b/Firebase/Auth/Source/Public/FIRPhoneAuthProvider.h index 138028a..5acc500 100644 --- a/Firebase/Auth/Source/Public/FIRPhoneAuthProvider.h +++ b/Firebase/Auth/Source/Public/FIRPhoneAuthProvider.h @@ -20,6 +20,7 @@ @class FIRAuth; @class FIRPhoneAuthCredential; +@protocol FIRAuthUIDelegate; NS_ASSUME_NONNULL_BEGIN @@ -85,6 +86,29 @@ FIR_SWIFT_NAME(PhoneAuthProvider) - (void)verifyPhoneNumber:(NSString *)phoneNumber completion:(nullable FIRVerificationResultCallback)completion; +/** @fn verifyPhoneNumber:UIDelegate:completion: + @brief Starts the phone number authentication flow by sending a verifcation code to the + specified phone number. + @param phoneNumber The phone number to be verified. + @param UIDelegate A view controller object used to present the SFSafariViewController or + WKWebview. + @param completion The callback to be invoked when the verification flow is finished. + @remarks Possible error codes: + <ul> + <li>@c FIRAuthErrorCodeCaptchaCheckFailed - Indicates that the reCAPTCHA token obtained by + the Firebase Auth is invalid or has expired.</li> + <li>@c FIRAuthErrorCodeQuotaExceeded - Indicates that the phone verification quota for this + project has been exceeded.</li> + <li>@c FIRAuthErrorCodeInvalidPhoneNumber - Indicates that the phone number provided is + invalid.</li> + <li>@c FIRAuthErrorCodeMissingPhoneNumber - Indicates that a phone number was not provided. + </li> + </ul> + */ +- (void)verifyPhoneNumber:(NSString *)phoneNumber + UIDelegate:(nullable id<FIRAuthUIDelegate>)UIDelegate + completion:(nullable FIRVerificationResultCallback)completion; + /** @fn credentialWithVerificationID:verificationCode: @brief Creates an @c FIRAuthCredential for the phone number provider identified by the verification ID and verification code. |