You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@KhaledAld Have you solved the problem yet? You mentioned your problem in #359
To migrate users from your server to skygear, you don't need to do it in cloud function. There are several ways to do it.
The simplest way, you can create a node script and import skygear js sdk. In the node script, fetch your server users data, generate JWT token and call loginWithCustomToken. But this way will have a problem that all users created_at and last_login_at will be the same (the time that you run the script.) If those information is important to you and you need to migrate them, you can consider method 2.
Understand the user models in skygear postgresql db, migrate data to db directly. By using this way, you can fully control the data. When signing up a user, there will have 3 entries inserted into the db. They are user, _auth and _sso_custom_token. user._id, auth.id and _sso_custom_token.user_id should be same uuid for each user. _sso_custom_token.principal_id is the sub of JWT token.
Hi
how to make migrate users from my server to skygear database.
can I use cloud function to create API to add my users to a skygear server?
Thanks.
The text was updated successfully, but these errors were encountered: