Skip to content

How do you insert an auth.users in a seed file? #1323

Discussion options

You must be logged in to vote

Is this for new users to your system or are you migrating from another database to Supabase?

if new users you are probably best off doing a loop with all the users and calling the await supabase.auth.api.inviteUserByEmail('email_address_here') with their email address and provide a page for them to complete the process.

If they are existing users then turn off email confirmation and do a loop with all the users again while calling await supabase.auth.signUp({ email, password }) and let Supabase deal with the encryption for you.

Otherwise, if you want to do a straight DB insertion you will need to find out what encryption function is being used for the passwords and how you can call it ins…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@KrisCoulson
Comment options

Answer selected by KrisCoulson
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants