Swift: Create a new user

Parameters

Examples

Sign up with email and password

try await supabase.auth.signUp(
  email: "example@email.com",
  password: "example-password"
)

Sign up with a phone number and password (SMS)

try await supabase.auth.signUp(
  phone: "123456789",
  password: "example-password",
  channel: "sms"
)

Sign up with a phone number and password (whatsapp)

try await supabase.auth.signUp(
  phone: "123456789",
  password: "example-password",
  channel: "whatsapp"
)

Sign up with additional user metadata

try await supabase.auth.signUp(
  email: "example@email.com",
  password: "example-password",
  data: [
    "first_name": .string("John"),
    "age": .number(24)
  ]
)

Sign up with a redirect URL

try await supabase.auth.signUp(
  email:  "example@email.com",
  password: "example-password",
  redirectTo: URL(string: "https://example.com/welcome")!
)