Skip to content

[Bug] — createUser method and email confirmations #313

@kiya-abdulahi

Description

@kiya-abdulahi

Bug report

Describe the bug

Using the auth.api.createUser when email confirmations are disabled does not automatically confirm emails.

For instance, if you disable email confirmations and create a users via auth.api.createUser, the auth.users table will show the email_confirmed_at column as null and the supabase ui will show Waiting for verification..:

image

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Disable email confirmations
  2. Create a user via auth.api.createUser
  3. View the auth.users table
  4. Take a look at the email_confirmed_at column which will be null
  5. Take a look at the supabase ui that shows users and you'll see the Last Sign In column show Waiting for verification..

Expected behavior

The expected behavior when creating a user while having email confirmations disabled is that the email_confirmed_at column on the auth.users table will be set to the time the user signed up and the supabase ui that shows users will have Last Sign In set to the time the user signed up.

This is how the behavior is when creating a user via auth.signUp

image

System information

  • OS: macOS
  • Version of supabase-js: [1.28.2]
  • Version of Node.js: [14.18.0]

Additional context

I also noticed that if you have email confirmations enabled and a user is created via auth.api.createUser, no email confirmation is sent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions