Skip to content

Commit

Permalink
Fix further linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ncooke3 committed Nov 1, 2024
1 parent 2c73bbb commit 88677ce
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions FirebaseAuth/Sources/Swift/Backend/AuthBackend.swift
Original file line number Diff line number Diff line change
Expand Up @@ -138,21 +138,22 @@ class AuthBackend: AuthBackendProtocol {
private static func phoneCredentialInUse(response: AuthRPCResponse) -> Error? {
#if !os(iOS)
return nil
#else
if let phoneAuthResponse = response as? VerifyPhoneNumberResponse,
let phoneNumber = phoneAuthResponse.phoneNumber,
phoneNumber.count > 0,
let temporaryProof = phoneAuthResponse.temporaryProof,
temporaryProof.count > 0 {
let credential = PhoneAuthCredential(withTemporaryProof: temporaryProof,
phoneNumber: phoneNumber,
providerID: PhoneAuthProvider.id)
return AuthErrorUtils.credentialAlreadyInUseError(message: nil,
credential: credential,
email: nil)
} else {
return nil
}
#endif // !os(iOS)
if let phoneAuthResponse = response as? VerifyPhoneNumberResponse,
let phoneNumber = phoneAuthResponse.phoneNumber,
phoneNumber.count > 0,
let temporaryProof = phoneAuthResponse.temporaryProof,
temporaryProof.count > 0 {
let credential = PhoneAuthCredential(withTemporaryProof: temporaryProof,
phoneNumber: phoneNumber,
providerID: PhoneAuthProvider.id)
return AuthErrorUtils.credentialAlreadyInUseError(message: nil,
credential: credential,
email: nil)
} else {
return nil
}
}

/// Calls the RPC using HTTP request.
Expand Down

0 comments on commit 88677ce

Please sign in to comment.