Dart Reference v2.0

Create a user

Creates a new user.

  • To confirm the user's email address or phone number, set 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.
  • If you are sure that the created user's email or phone number is legitimate and verified, you can set the email_confirm or phone_confirm param to true.
Parameters
    attributes
    REQUIRED
    AdminUserAttributes

    Attributes to create the user with.


final res = await supabase.auth.admin.createUser(AdminUserAttributes(
  email: '[email protected]',
  password: 'password',
  userMetadata: {'name': 'Yoda'},
));