-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The _hashed_password
field cannot be deleted from _User collection
#9287
Comments
Thanks for opening this issue!
|
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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The text was updated successfully, but these errors were encountered: