Kotlin: Create a user

Creates a new user.

Parameters

Examples

Create user with email

val userWithEmail = supabase.auth.admin.createUserWithEmail \{
    email = "example@email.com"
    password = "secretpassword"
    userMetadata \{
        put("name", "John")
    \}
\}

Create user with phone

val userWithPhone = supabase.auth.admin.createUserWithPhone \{
    phone = "+49123456789"
    password = "secretpassword"
    userMetadata \{
        put("name", "John")
    \}
\}

Auto-confirm the user's email

val userWithEmail = supabase.auth.admin.createUserWithEmail \{
    email = "example@email.com"
    password = "secretpassword"
    autoConfirm = true
\}

Auto-confirm the user's phone number

val userWithPhone = supabase.auth.admin.createUserWithPhone \{
    phone = "+49123456789"
    password = "secretpassword"
    autoConfirm = true
\}