Kotlin: Create a new user

Creates a new user.

Parameters

Examples

Sign up with email

val user = supabase.auth.signUpWith(Email) \{
    email = "example@email.com"
    password = "example-password"
\}

Sign up with a phone number and password (whatsapp)

val user = supabase.auth.signUpWith(Phone) \{
    phone = "+4912345679"
    password = "example-password"
    channel = Phone.Channel.WHATSAPP
\}

Sign up with a phone number and password (sms)

val user = supabase.auth.signUpWith(Phone) \{
    phone = "+4912345679"
    password = "example-password"
\}

Sign up with additional user metadata

val user = supabase.auth.signUpWith(Email) \{
    email = "example@email.com"
    password = "example-password"
    data = buildJsonObject \{
       put("first_name", "John")
       put("age", 24)
    \}
\}

Sign up with a redirect URL

val user = supabase.auth.signUpWith(Email, redirectUrl = "https://example.com") \{
    email = "example@email.com"
    password = "example-password"
\}