Creates a new user.
email_confirm
or phone_confirm
to true. Both arguments default to false.createUser()
will not send a confirmation email to the user. You can use inviteUserByEmail()
if you want to send them an email invite instead.email_confirm
or phone_confirm
param to true
.Attributes to create the user with.
final res = await supabase.auth.admin.createUser(AdminUserAttributes(
email: 'user@email.com',
password: 'password',
userMetadata: \{'name': 'Yoda'\},
));
final res = await supabase.auth.admin.createUser(AdminUserAttributes(
email: 'user@email.com',
emailConfirm: true,
));
final res = await supabase.auth.admin.createUser(AdminUserAttributes(
phone: '1234567890',
phoneConfirm: true,
));