Swift: Generate an email link

Generates an email link for a specific action without sending it. This is useful for custom admin functionality where you want to build the email or OTP flow yourself.

Examples

Generate a signup link

let response = try await supabase.auth.admin.generateLink(
  params: .signUp(
    email: "email@example.com",
    password: "secret"
  )
)

let actionLink = response.properties.actionLink

Generate a recovery link

let response = try await supabase.auth.admin.generateLink(
  params: .recovery(
    email: "email@example.com",
    redirectTo: URL(string: "https://example.com/reset-password")
  )
)