supabase / auth

A JWT based API for managing users and issuing JWT tokens

Home Page:https://supabase.com/docs/guides/auth

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

auth.admin.createUser with password_hash does not save correct hash and id does not save

jmarbutt opened this issue · comments

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

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

Use the admin sdk to create a new user passing a password_hash does not save the correct password hash:

                let result = await supabase.auth.admin.createUser({
                    id: legacyUser.Id as string,
                    email: legacyUser.EMailAddress as string,
                    password_hash: legacyUser.PasswordHash as string,
                    phone: legacyUser.PhoneNumber as string,
                    email_confirm: true,
                    phone_confirm: true,
                    app_metadata: {
                 
                    }
                });

Expected behavior

The admin sdk should accept setting the password_hash and the id if it is a uuid.

System information

  • OS: macOs
  • Version of supabase-js: 2.44.4
  • Version of Node.js: 22.3.0

does not save correct hash and id does not save

hey @jmarbutt, what error are you getting and do you have any reproducible steps here? it will be alot easier for us to investigate the issue if you can open a ticket on https://supabase.help and indicate that i've directed you from this gh issue

@kangmingtay there is no error, it just doesn't save it to the db.

@jmarbutt have you opened a ticket with us yet?