For AI agents: the documentation index is at llms.txt. Guide pages have a markdown version at the same path with .md appended, before any query string or fragment.

Swift: Create a challenge

Examples

Create a challenge for a factor

let challenge = try await supabase.auth.mfa.challenge(
  factorID: UUID(uuidString: "34e770dd-9ff9-416c-87fa-43b31d7ef225")!
)
let challengeID = challenge.id
let expiresAt = challenge.expiresAt

Send the code for a phone factor through WhatsApp

let challenge = try await supabase.auth.mfa.challenge(
  factorID: factor.id,
  channel: .whatsapp
)