Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Update user profile on MongoDB Stitch

I've been able to do a register and login using MongoDB Stitch but I can't find how to update a user's data. I've tried making queries to db.users or db.user but these don't exist.

Is there a method to update a user?

like image 929
facumedica Avatar asked Feb 13 '18 04:02

facumedica


People also ask

How do I authenticate a client in MongoDB?

To authenticate a client in MongoDB, you must add a corresponding user to MongoDB. You can add a user with the db.createUser () method using mongosh. The first user you create must have privileges to create other users. The userAdmin or userAdminAnyDatabase role both confer the privilege to create other users.

How do I manage users in MongoDB?

For users created in MongoDB, MongoDB stores all user information, including name, password, and the user's authentication database, in the system.users collection in the admin database. Do not modify this collection directly. To manage users, use the designated user management commands.

How do I prompt for a password from the mongo shell?

Starting in version 4.2 of the mongo shell, you can use the passwordPrompt () method in conjunction with various user authentication/management methods/commands to prompt for the password instead of specifying the password directly in the method/command call.


Video Answer


1 Answers

I communicated with support and they told me that there is no way to update a user's profile as they are stored in a internal database that is not accesible to the developer. I suggested that this must be explained in the guides but they didn't (or I couldn't find it, please comment and I'll edit).

like image 109
facumedica Avatar answered Sep 20 '22 03:09

facumedica