Migrating existing Users to Parse-Server


I have this pressing issue, i search so well and cant find an answer.

How do i migrate existing users to parse-server ?
For users with username and password, i can write a cloud function to do that, but i have problems with social ath Users.(eg google, facebook, apple)

how do i create the username, emailaddress and authdata via cloud code?

Please help

I assume your current server is also parse server right? So you want to move users from parse server to another parse server?

If that’s the case, you can use mongodump and mongorestore.

1 Like

No my current server is not a Parse Server.

Then you may have to use some script to make it parse compatible. What do you use currently?

old server

PHP - my login was custom, did the oauth and logs the user, the login flow was custom. so i have users email and login providers.

Parse-server - i did the login flow from the client. (this is fine) but how do i migrate users. This users will login from the client and they will be merged with the migrated users.

I did a POC but i get the error 203 email in use (i used cloudcode to add the users , just email and username, (no authdata))

i wrote a script but i get an error, Parse is asking for password or authData and it wont save without id_token etc.


One thing I like to do when I need to skip Parse authentication and access the database for migration is:

import Config from './../node_modules/parse-server/lib/Config.js';
const app = Config.get(process.env.APP_ID);
await app.database.create(className, json)

Note that you will need to set createdAt, ACL, etc manually.

Only use temporarily for migration.

1 Like