Swift: Enroll a factor

Examples

Enroll a time-based, one-time password (TOTP) factor

let response = try await supabase.auth.mfa.enroll(
  params: MFAEnrollParams(
    issuer: "optional issuer",
    friendlyName: "optional friendly name"
  )
)

// Use the id to create a challenge.
// The challenge can be verified by entering the code generated from the authenticator app.
// The code will be generated upon scanning the qrCode or entering the secret into the authenticator app.
let id = response.id
let type = response.type
let qrCode = response.totp?.qrCode
let secret = response.totp?.secret
let uri = response.totp?.uri