Hi, is there any way to make test users seeder wit...
# support-questions-legacy
i
Hi, is there any way to make test users seeder with commands from sdk or with another way?
r
hey! Could you please elaborate on your question a bit more?
i
I want to add user to my main database and to supertokens synchronously. So to do this with ny main databse i use entity manager from mikro-orm with seeder options. So how can I add user to supertokens table with same credentials?
r
You can override the sign up API on the backend, and after the original implementation has finished running, you can add to your own db
if you have disabled the sign up API from supertokens, there should be a signUp helper function exposed by the backend SDK for your recipe - which recipe are you using?
i
Ok, I will explain in another way. I want to use SDK functions to add user on the start initialization after i run my code, without calling api endpoint, how can i do this?
r
Which recipe are you using?
It depends on that
i
Email-password
r
So you can call the EmailPassword.signUp function -> https://supertokens.com/docs/nodejs/modules/recipe_emailpassword.html#signUp-1
i
So how can in call this out of supertokens module? or there is a section inside init function to do this?)))
r
oh no. You would just call it anywhere you like (after init is finished)
like in your own API, or anywhere really
i
Ok, it is very good, thanks, the last question, can i assign my own user id?
and we are working on a featrue that will make it easier for you to do this. Should be out in 1-2 weeks
i
no-no, with ids everything is very good. i have the same in supertokens and my database and it creates both fine. I want to assign organization entity to user with constant id, but for now id changes dynamicaly
r
So everytime you create a new user, supertokens will generate a new user ID for you'
so if you want to assign some org ID to a user, you will have to do that based on email or something
i
ok... its not so good, will think...
Thank you
r
cool