Skip to content

feat: Upgrade Auth0.swift to v3.0.2 - #909

Merged
NandanPrabhu merged 7 commits into
develop/v3.0from
feat/auth0-swift-v3.0
Aug 5, 2026
Merged

feat: Upgrade Auth0.swift to v3.0.2#909
NandanPrabhu merged 7 commits into
develop/v3.0from
feat/auth0-swift-v3.0

Conversation

@NandanPrabhu

@NandanPrabhu NandanPrabhu commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Upgraded Auth0.swift dependency from v2.x to v3.0.1 for iOS, macOS, tvOS, and watchOS
  • Updated all Darwin plugin method handlers to handle Auth0 v3 API changes
  • Updated test suite to match new Auth0.swift v3.0.1 signatures
  • Removed deprecated APIs and adapted to new error handling patterns

Key Changes

Dependency Updates

  • Updated podspec files to use Auth0.swift 3.0.2
  • Updated Swift Package Manager dependencies

API Migration

  • Error Handling: Migrated from .webAuthError() to .authenticationError() for WebAuth errors
  • Credentials Manager: Updated credential manager API calls for v3 signatures
  • Auth API: Adapted authentication API method handlers for new response types
  • MFA API: Updated multifactor authentication handlers
  • Passkey Support: Updated passkey credential exchange methods

Test Suite Updates

  • Updated test mocks and spies to match Auth0.swift v3.0.1 signatures
  • Fixed error handling assertions in test cases
  • Updated method signatures across all test files

Test Plan

  • All existing unit tests pass
  • iOS example app runs successfully
  • Login/logout flow works
  • Credentials manager operations work
  • MFA flows work correctly
  • Passkey authentication works

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (3)
  • main
  • beta-release/.*
  • release/.*

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1cef360c-6bbe-41c2-af38-ab6b3955de43

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/auth0-swift-v3.0

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@NandanPrabhu NandanPrabhu changed the title feat: Upgrade Auth0.swift to v3.0.1 feat: Upgrade Auth0.swift to v3.0.2 Jul 30, 2026
@NandanPrabhu
NandanPrabhu marked this pull request as ready for review August 3, 2026 05:56
@NandanPrabhu
NandanPrabhu requested a review from a team as a code owner August 3, 2026 05:56
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.
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/).
Comment thread auth0_flutter/macos/auth0_flutter.podspec Outdated
Comment thread auth0_flutter/ios/auth0_flutter.podspec Outdated
@NandanPrabhu
NandanPrabhu merged commit 2cf6765 into develop/v3.0 Aug 5, 2026
13 checks passed
@NandanPrabhu
NandanPrabhu deleted the feat/auth0-swift-v3.0 branch August 5, 2026 11:02
utkrishtsahu added a commit that referenced this pull request Aug 6, 2026
…id v4

v4 renamed SSOCredentials.expiresIn (Int seconds) to expiresAt (Date). Convert back to seconds-until-expiry so the Dart model is unchanged, mirroring iOS (#909).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:large Large review v3.0 label for all the PR associated with v3.0 major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants