Skip to content

Commit

Permalink
Update PhoneAuthProvider.swift addressing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiaoshouzi-gh authored Nov 25, 2024
1 parent f36c832 commit 5ccb81f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions FirebaseAuth/Sources/Swift/AuthProvider/PhoneAuthProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import Foundation
@objc(FIRPhoneAuthProvider) open class PhoneAuthProvider: NSObject {
/// A string constant identifying the phone identity provider.
@objc public static let id = "phone"
@objc private static let kRecaptchaVersion = "RECAPTCHA_ENTERPRISE"
@objc private static let kClientType = "CLIENT_TYPE_IOS"
@objc private static let kFakeCaptchaResponse = "NO_RECAPTCHA"
private static let recaptchaVersion = "RECAPTCHA_ENTERPRISE"
private static let clientType = "CLIENT_TYPE_IOS"
private static let fakeCaptchaResponse = "NO_RECAPTCHA"

#if os(iOS)
/// Returns an instance of `PhoneAuthProvider` for the default `Auth` object.
Expand Down Expand Up @@ -260,7 +260,7 @@ import Foundation
}

/// Starts the flow to verify the client via silent push notification.
/// - Parameter retryOnInvalidAppCredential: Whether of not the flow should be retried if an
/// - Parameter retryOnInvalidAppCredential: Whether or not the flow should be retried if an
/// AuthErrorCodeInvalidAppCredential error is returned from the backend.
/// - Parameter phoneNumber: The phone number to be verified.
/// - Parameter callback: The callback to be invoked on the global work queue when the flow is
Expand All @@ -277,8 +277,8 @@ import Foundation
.requestConfiguration)
if auditFallback {
request.injectRecaptchaFields(
recaptchaResponse: PhoneAuthProvider.kFakeCaptchaResponse,
recaptchaVersion: PhoneAuthProvider.kRecaptchaVersion
recaptchaResponse: PhoneAuthProvider.fakeCaptchaResponse,
recaptchaVersion: PhoneAuthProvider.recaptchaVersion
)
}
do {
Expand Down Expand Up @@ -402,9 +402,9 @@ import Foundation
codeIdentity: codeIdentity)
if auditFallback {
startMFARequestInfo.injectRecaptchaFields(
recaptchaResponse: PhoneAuthProvider.kFakeCaptchaResponse,
recaptchaVersion: PhoneAuthProvider.kRecaptchaVersion,
clientType: PhoneAuthProvider.kClientType
recaptchaResponse: PhoneAuthProvider.fakeCaptchaResponse,
recaptchaVersion: PhoneAuthProvider.recaptchaVersion,
clientType: PhoneAuthProvider.clientType
)
}
do {
Expand Down

0 comments on commit 5ccb81f

Please sign in to comment.