feat: Upgrade Auth0.swift to v3.0.2 - #909
Draft
NandanPrabhu wants to merge 3 commits into
Draft
Conversation
Bumps the native iOS/macOS SDK dependency from 2.23.0 to 3.0.1 across the podspecs, Package.swift, and Package.resolved lockfiles, and updates every native call site for the v3 breaking changes: the Authentication -> MFAClient split for OTP login/MFA challenge, WebAuth.clearSession -> logout, CredentialsManager.store/clear becoming throwing calls, CredentialsManager.user -> userProfile(), UserInfo -> UserProfile, and Credentials.expiresIn -> expiresAt. Also updates the Dart-facing multifactorChallenge API: authenticatorId is now required and the types parameter is removed, since Auth0.swift v3's MFAClient.challenge(with:mfaToken:) has no equivalent for challenge-type filtering.
…test suite Fixes a remaining compile error in WebAuthLoginMethodHandler.swift: Auth0.swift v3 made WebAuthentication.safariProvider @MainActor-isolated, which broke the default-argument closure and its call site. Also adds UIScene support (SceneDelegate.swift + Info.plist manifest) and bumps the example app's CocoaPods deployment target to 15.0, both needed to actually launch the example app on current Xcode/iOS Simulator versions. Migrates the darwin plugin's XCTest suite (previously untouched by the v3 dependency bump) to the new SDK shape: Telemetry -> Auth0ClientInfo, UserInfo -> UserProfile, expiresIn -> expiresAt, throwing CredentialsStorage, Request<T,E> -> any Requestable/TokenRequestable (via new MockRequest/MockTokenRequest test doubles), the Authentication -> MFAClient split for OTP login and MFA challenge, and the new WebAuthError cases. All 358 RunnerTests unit tests pass.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The macOS test target was missing 8 MFA-related test files that are referenced by other test files. This caused compilation errors in GitHub Actions when building macOS tests, specifically: - SpyMFAClient not found (defined in MfaSpies.swift) - Other MFA test infrastructure missing Added the following test files to the macOS RunnerTests target: - MfaSpies.swift - MfaGetAuthenticatorsMethodHandlerTests.swift - MfaEnrollTotpMethodHandlerTests.swift - MfaEnrollPhoneMethodHandlerTests.swift - MfaEnrollEmailMethodHandlerTests.swift - MfaEnrollPushMethodHandlerTests.swift - MfaChallengeMethodHandlerTests.swift - MfaVerifyMethodHandlerTests.swift These files already existed in the iOS test target and are shared via relative path (../ios/Tests/Mfa/).
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.
Summary
Key Changes
Dependency Updates
API Migration
.webAuthError()to.authenticationError()for WebAuth errorsTest Suite Updates
Test Plan