Kotlin: Create a user

Creates a new user.

Examples

Create user with email

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

Create user with phone

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

Auto-confirm the user's email

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

Auto-confirm the user's phone number

val userWithPhone = supabase.gotrue.admin.createUserWithPhone {
    phoneNumber = "+49123456789"
    password = "secretpassword"
    autoConfirm = true
}