Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks done
jmarbutt opened this issue Jul 24, 2024 · 4 comments
Open
2 tasks done
Labels
auth bug Something isn't working

Comments

@jmarbutt
Copy link

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
@jmarbutt jmarbutt added the bug Something isn't working label Jul 24, 2024
@jmarbutt
Copy link
Author

We were discussing this on discord here https://discord.com/channels/839993398554656828/1265376065828819066

@encima encima transferred this issue from supabase/supabase Jul 24, 2024
@encima encima added the auth label Jul 24, 2024
@kangmingtay
Copy link
Member

kangmingtay commented Jul 25, 2024

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

@jmarbutt
Copy link
Author

jmarbutt commented Aug 1, 2024

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

@kangmingtay
Copy link
Member

@jmarbutt have you opened a ticket with us yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants