-
When creating a user (email/password) through the Atlas UI, I noticed the User Creation Function does not get called (this is where I insert a record into the users collection). It does get called if the user creation happens through the swift sdk. Is this expected?
-
In working around the above issue, I moved the User Creation code to a Log In Trigger. Sync Service Rules seem to be determined before the trigger happens. When I open the realm I am getting errors because the data needed in custom_data does not exist. If restart the swift app, it works fine. Again, this only happens the first time if a user does not have a record defined in the users table.
-
Below is my Read Document Permissions assigned to a collection. When there is no user record, it throws an error … “state_Account”: (BadValue) $in needs an array. Is there anyway to write this rule so I can handle a case when accountIds does not exist (return no records and not throw an error).
{
"_id": {
"$in": "%%user.custom_data.accountIds"
}
}