Swift 6.0 migration causes EXC_BREAKPOINT when calling callback.failure(.noCredentials) in Auth0.swift

I am facing a crash after migrating an iOS app to Swift 6.0, and it seems related to Swift Concurrency / callbacks in Auth0.swift.

Environment

  • iOS app

  • Swift 6.0

  • Auth0.swift (version: please confirm, possibly < 2.7.2)

  • Using Auth0 WebAuth login flow

Issue

During the authentication flow, the app crashes with the following behavior:

  • The crash occurs exactly at:

    return callback.failure(.noCredentials)
    
    
  • Xcode shows:

    Thread 10: EXC_BREAKPOINT
    
    
  • The callback is being called, but the app crashes at runtime when this line is executed.

This looks similar to a Swift Concurrency runtime trap, not a normal logical error.

Suspected cause

Based on investigation, this appears related to Swift Concurrency continuation misuse, similar to what was discussed in:

In Swift 6, runtime checks are stricter, and calling a continuation or callback:

  • more than once, or

  • from an unexpected thread / actor

results in an immediate EXC_BREAKPOINT.

Questions

  1. Is this a known Swift 6–specific issue when using Auth0.swift?

  2. Is upgrading to Auth0.swift ≥ 2.7.2 (which addresses concurrent WebAuth / continuation misuse) the recommended solution?

  3. Are there any Swift 6–specific guidelines for safely handling Auth0 callbacks (e.g. MainActor requirements)?

Any confirmation or guidance would be greatly appreciated.

Thank you.

Hi @Sashq-o

Welcome to the Auth0 Community!

I am sorry about the late reply to your question.

Indeed, the issue might be caused due to the outdated version of the Swift SDK. The recommended solution would be to upgrade it and any other dependencies in your environment unless you want to look forward to implementing a custom solution to the issue at hand.

If you have any other questions, let me know!

Kind Regards,
Nik