Swift: Verify a challenge

Examples

Verify a challenge for a factor

let session = try await supabase.auth.mfa.verify(
  params: MFAVerifyParams(
    factorId: "34e770dd-9ff9-416c-87fa-43b31d7ef225",
    challengeId: "4034ae6f-a8ce-4fb5-8ee5-69a5863a7c15",
    code: "123456"
  )
)

Verify a WebAuthn factor (iOS 16+/macOS 13+, experimental)

// @_spi(Experimental) import Supabase
// verifyWebAuthnFactor drives the full ceremony: challenge → present native UI → verify.
let session = try await supabase.auth.mfa.verifyWebAuthnFactor(
  factorId: "34e770dd-9ff9-416c-87fa-43b31d7ef225",
  presentationAnchor: view.window!
)