When I log with a user the userObject contains empty customData
object despite saving a document in custom data collection pointing to the app user.
I tried to follow the documentation:
In the Users section of Mongo Stitch panel I enabled custom data. I chose database, collection (
users
) and statedUser ID Field
to beuserId
. Then I deployed changes.I have a created and confirmed user.
I copied the user's
_id
and from shell (from admin account and context of the relevant db) I ran commanddb.users.insertOne({userId: ObjectId('copied_id'), description: "something"})
. It was acknowledged and when I query the collection I see relevant document withuserId
field having correct ObjectId() value.I even tried to set read rights to the
users
collection.
Nonetheless, if I log in with my user, customData
object is empty. What can be the cause of this?