Sync biometrics with main#232
Open
yafuquen wants to merge 24 commits into
Open
Conversation
…re/biometrics # Conflicts: # TwilioVerifySDK.xcodeproj/project.pbxproj # TwilioVerifySDK/TwilioSecurity/Sources/Keychain/KeychainQuery.swift # TwilioVerifySDKTests/TwilioSecurity/Sources/Keychain/KeychainQueryTests.swift # TwilioVerifySDKTests/TwilioSecurity/Sources/Keychain/Mocks/KeychainMock.swift # fastlane/Fastfile
* [26703] - Add Optional Attemps for CopyItemMatching. - Add Optional attempt for get queries on SecureStorage & AuthenticatedSecureStorage. * [26703] - Add Optional Attemps for CopyItemMatching. - Set only 1 retry for the AuthenticatedSecureStorage biometric verification.
- Make KeychainError public. Co-authored-by: Yeimi Moreno <ymoreno@twilio.com>
BREAKING CHANGE: Dropped support for iOS 11
…ion, for enabling users to migrate their factors to another iPhone or restore them during backup processes. (#218)
* fix: Gemfile to reduce vulnerabilities The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-RUBY-REXML-6861566 * Update CircleCI Resources --------- Co-authored-by: snyk-bot <snyk-bot@snyk.io>
# Conflicts: # Gemfile.lock # README.md # fastlane/Fastfile
Version 3.0.0
…ios into ymoreno/biometrics # Conflicts: # fastlane/Fastfile
…no/biometrics # Conflicts: # TwilioVerifySDK/TwilioSecurity/Sources/Keychain/Keychain.swift # TwilioVerifySDK/TwilioSecurity/Sources/Keychain/KeychainQuery.swift # TwilioVerifySDKTests/TwilioSecurity/Sources/Keychain/KeychainQueryTests.swift
AuthyApps
reviewed
Apr 30, 2025
| var accessGroup: String? | ||
| let accessGroup: String? | ||
|
|
||
| init(accessGroup: String?) { |
There was a problem hiding this comment.
This memberwise initializer would be synthesized automatically - you do not need to define itunneeded_synthesized_initializer KeychainQuery.swift:60 |
AuthyApps
reviewed
Apr 30, 2025
| @@ -76,7 +76,7 @@ class KeychainQueryTests: XCTestCase { | |||
|
|
|||
| func testSaveData_withKey_shouldReturnValidQuery() { | |||
| let expectedData = "data".data(using: .utf8)! | |||
There was a problem hiding this comment.
Prefer non-optional Data(_:) initializer when converting String to Datanon_optional_string_data_conversion KeychainQueryTests.swift:78 |
AuthyApps
reviewed
Apr 30, 2025
|
|
||
| func testSaveItem_withAccessGroup_shouldReturnValidQuery() { | ||
| keychainQuery = KeychainQuery(accessGroup: Constants.accessGroup) | ||
| let expectedData = "data".data(using: .utf8)! |
There was a problem hiding this comment.
Prefer non-optional Data(_:) initializer when converting String to Datanon_optional_string_data_conversion KeychainQueryTests.swift:145 |
AuthyApps
reviewed
Apr 30, 2025
|
|
||
| func testSaveItem_withAttrAccessible_shouldReturnValidQuery() { | ||
| keychainQuery = KeychainQuery(accessGroup: Constants.accessGroup) | ||
| let expectedData = "data".data(using: .utf8)! |
There was a problem hiding this comment.
Prefer non-optional Data(_:) initializer when converting String to Datanon_optional_string_data_conversion KeychainQueryTests.swift:162 |
AuthyApps
reviewed
Apr 30, 2025
| @@ -41,6 +41,7 @@ class FactorAPIClientTests: XCTestCase { | |||
| let expectedResponse = "{\"key\":\"value\"}".data(using: .utf8)! | |||
There was a problem hiding this comment.
Prefer non-optional Data(_:) initializer when converting String to Datanon_optional_string_data_conversion FactorAPIClientTests.swift:41 |
AuthyApps
reviewed
Apr 30, 2025
| "User agent header should not be nil") | ||
| XCTAssertEqual(String(decoding: networkProvider.urlRequest!.httpBody!, as: UTF8.self), params.asString(), | ||
| "Body should be \(params.asString()) but was \(networkProvider.urlRequest!.httpBody!)") | ||
| XCTAssert(String(decoding: networkProvider.urlRequest!.httpBody!, as: UTF8.self) == params.asString() || String(decoding: networkProvider.urlRequest!.httpBody!, as: UTF8.self) == paramsv2.asString(), |
There was a problem hiding this comment.
Prefer failable String(data:encoding:) initializer when converting Data to Stringoptional_data_string_conversion FactorAPIClientTests.swift:161 |
AuthyApps
reviewed
Apr 30, 2025
| "User agent header should not be nil") | ||
| XCTAssertEqual(String(decoding: networkProvider.urlRequest!.httpBody!, as: UTF8.self), params.asString(), | ||
| "Body should be \(params.asString()) but was \(networkProvider.urlRequest!.httpBody!)") | ||
| XCTAssert(String(decoding: networkProvider.urlRequest!.httpBody!, as: UTF8.self) == params.asString() || String(decoding: networkProvider.urlRequest!.httpBody!, as: UTF8.self) == paramsv2.asString(), |
There was a problem hiding this comment.
Line should be 195 characters or less; currently it has 203 charactersline_length FactorAPIClientTests.swift:161 |
AuthyApps
reviewed
Apr 30, 2025
| XCTAssertEqual(String(decoding: networkProvider.urlRequest!.httpBody!, as: UTF8.self), params.asString(), | ||
| "Body should be \(params.asString()) but was \(networkProvider.urlRequest!.httpBody!)") | ||
| XCTAssert(String(decoding: networkProvider.urlRequest!.httpBody!, as: UTF8.self) == params.asString() || String(decoding: networkProvider.urlRequest!.httpBody!, as: UTF8.self) == paramsv2.asString(), | ||
| "Body should be \(params.asString()) or \(paramsv2.asString()) but was \(String(decoding: networkProvider.urlRequest!.httpBody!, as: UTF8.self))") |
There was a problem hiding this comment.
Prefer failable String(data:encoding:) initializer when converting Data to Stringoptional_data_string_conversion FactorAPIClientTests.swift:162 |
AuthyApps
reviewed
Apr 30, 2025
| ) | ||
| static let failureResponse = FailureResponse( | ||
| statusCode: 401, | ||
| errorData: "error".data(using: .utf8)!, |
There was a problem hiding this comment.
Prefer non-optional Data(_:) initializer when converting String to Datanon_optional_string_data_conversion FactorAPIClientTests.swift:475 |
AuthyApps
reviewed
Apr 30, 2025
| @testable import TwilioVerifySDK | ||
|
|
||
| // swiftlint:disable force_cast force_try | ||
| // swiftlint:disable force_cast force_try type_body_length |
There was a problem hiding this comment.
Use 'next', 'this' or 'previous' instead to disable the 'type_body_length' rule once, or re-enable it as soon as possible
blanket_disable_command FactorMapperTests.swift:23` |
AuthyApps
reviewed
Apr 30, 2025
| @testable import TwilioVerifySDK | ||
|
|
||
| // swiftlint:disable force_cast force_try | ||
| // swiftlint:disable force_cast force_try type_body_length |
There was a problem hiding this comment.
Use 'next', 'this' or 'previous' instead to disable the 'force_try' rule once, or re-enable it as soon as possible
blanket_disable_command FactorMapperTests.swift:23` |
AuthyApps
reviewed
Apr 30, 2025
| @testable import TwilioVerifySDK | ||
|
|
||
| // swiftlint:disable force_cast force_try | ||
| // swiftlint:disable force_cast force_try type_body_length |
There was a problem hiding this comment.
Use 'next', 'this' or 'previous' instead to disable the 'force_cast' rule once, or re-enable it as soon as possible
blanket_disable_command FactorMapperTests.swift:23` |
AuthyApps
reviewed
Apr 30, 2025
| @testable import TwilioVerifySDK | ||
|
|
||
| // swiftlint:disable force_cast force_try | ||
| // swiftlint:disable force_cast force_try type_body_length |
There was a problem hiding this comment.
SwiftLint rule 'type_body_length' did not trigger a violation in the disabled region; remove the disable commandsuperfluous_disable_command FactorMapperTests.swift:23 |
AuthyApps
reviewed
Apr 30, 2025
| let factorPayload = CreateFactorPayload(friendlyName: Constants.friendlyNameValue, type: Constants.pushType, allowIphoneMigration: false, serviceSid: Constants.serviceSidValue, | ||
| identity: Constants.identityValue, config: [:], binding: [:], accessToken: Constants.accessToken, metadata: nil) | ||
| XCTAssertThrowsError(try mapper.fromAPI(withData: data, factorPayload: factorPayload)) { error in | ||
| XCTAssertEqual((error as! TwilioVerifyError).errorDescription, TwilioVerifyError.mapperError(error: NSError()).errorDescription) |
There was a problem hiding this comment.
Discouraged direct initialization of types that can be harmfuldiscouraged_direct_init FactorMapperTests.swift:127 |
Code coverageTotal coverage:
|
| File | Coverage |
|---|---|
| TwilioVerifySDK/TwilioSecurity/Sources/Key/Signer/ECSigner.swift | 100.00% |
| TwilioVerifySDK/TwilioSecurity/Sources/Key/Template/ECP256SignerTemplate.swift | 93.02% |
| TwilioVerifySDK/TwilioSecurity/Sources/Keychain/KeyManager.swift | 89.66% |
| TwilioVerifySDK/TwilioSecurity/Sources/Keychain/Keychain.swift | 89.06% |
| TwilioVerifySDK/TwilioSecurity/Sources/Keychain/KeychainQuery.swift | 100.00% |
| TwilioVerifySDK/TwilioSecurity/Sources/Storage/AuthenticatedSecureStorage.swift | 93.42% |
| TwilioVerifySDK/TwilioSecurity/Sources/Storage/SecureStorage.swift | 87.36% |
| TwilioVerifySDK/TwilioVerify/Sources/API/ChallengeAPIClient.swift | 93.62% |
| TwilioVerifySDK/TwilioVerify/Sources/Data/JWT/JwtGenerator.swift | 100.00% |
| TwilioVerifySDK/TwilioVerify/Sources/Data/JWT/JwtSigner.swift | 74.75% |
| TwilioVerifySDK/TwilioVerify/Sources/Data/KeyStorage.swift | 100.00% |
| TwilioVerifySDK/TwilioVerify/Sources/Data/Storage+AccessGroup.swift | 93.48% |
| TwilioVerifySDK/TwilioVerify/Sources/Data/Storage.swift | 91.18% |
| TwilioVerifySDK/TwilioVerify/Sources/Data/StorageProvider.swift | 80.85% |
| TwilioVerifySDK/TwilioVerify/Sources/Domain/Challenge/ChallengeFacade.swift | 96.84% |
| TwilioVerifySDK/TwilioVerify/Sources/Domain/Challenge/ChallengeRepository.swift | 94.37% |
| TwilioVerifySDK/TwilioVerify/Sources/Domain/Challenge/PushChallengeProcessor.swift | 97.30% |
| TwilioVerifySDK/TwilioVerify/Sources/Domain/Factor/FactorFacade.swift | 97.93% |
| TwilioVerifySDK/TwilioVerify/Sources/Domain/Factor/FactorMapper.swift | 100.00% |
| TwilioVerifySDK/TwilioVerify/Sources/Domain/Factor/FactorRepository.swift | 100.00% |
| TwilioVerifySDK/TwilioVerify/Sources/Domain/Factor/Models/PushFactor.swift | 100.00% |
| TwilioVerifySDK/TwilioVerify/Sources/Domain/Factor/PushFactory.swift | 98.90% |
| TwilioVerifySDK/TwilioVerify/Sources/Domain/Manager/TwilioVerify.swift | 81.25% |
| TwilioVerifySDK/TwilioVerify/Sources/Domain/Manager/TwilioVerifyManager.swift | 100.00% |
| TwilioVerifySDK/TwilioVerify/Sources/Logger/Logger.swift | 100.00% |
| TwilioVerifySDK/TwilioVerify/Sources/Models/ChallengeListPayload.swift | 100.00% |
| TwilioVerifySDK/TwilioVerify/Sources/Models/Factor.swift | 85.71% |
| TwilioVerifySDK/TwilioVerify/Sources/Models/FactorPayload.swift | 100.00% |
| TwilioVerifySDK/TwilioVerify/Sources/Models/UpdateChallengePayload.swift | 100.00% |
| TwilioVerifySDK/TwilioVerify/Sources/Models/UpdateFactorPayload.swift | 100.00% |
| TwilioVerifySDK/TwilioVerify/Sources/Models/VerifyFactorPayload.swift | 100.00% |
| TwilioVerifySDK/TwilioVerify/Sources/Networking/Authentication.swift | 100.00% |
Powered by Slather
Generated by 🚫 Danger
…ipeline chore: Fix release process
chore: Fix Github author for CI
chore: fix release process.
…no/biometrics # Conflicts: # TwilioVerifySDK/TwilioSecurity/Sources/Keychain/Keychain.swift # TwilioVerifySDK/TwilioSecurity/Sources/Keychain/KeychainQuery.swift
SergioFierro
approved these changes
May 7, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket
Github Issue
Description
Commit message
Screenshot
Testing