Open tiavina-mika opened 3 weeks ago
The solution I found is to delete it using mongodb directly
import Config from 'parse-server/lib/Config';
const user = await new Parse.Query(Parse.User).equalTo('objectId', 'xxxxx').first({ useMasterKey: true });
const config = Config.get(Parse.applicationId);
const mongoAdapter = config.database.adapter;
await mongoAdapter.connect();
const userCollection = mongoAdapter.database.collection('_User');
const query = { _id: user.id };
const body = { $unset: { "_hashed_password": "" } };
await userCollection.updateOne(query, body);
New Issue Checklist
Issue Description
The
_hashed_password
field cannot be deleted from _User collectionSteps to reproduce
I try
Actual Outcome
The field is not deleted in the _User collection
Expected Outcome
_hashed_password
field should be deleted in the _User collectionEnvironment
Server
"parse-server": "^7.2.0",
Windows 10
Local
Database
MongoDB
v4.0.6
MongoDB Atlas
Client
JavaScript
5.3.0