Uploaded image for project: 'Realm JavaScript SDK'
  1. Realm JavaScript SDK
  2. RJS-2415

Reset sync session after user custom data update

      Problem

      When you update a user custom data field that affects a user role permission(s), it doesn't take effect in their permission until realm sync is closed and started again, even if user.refreshCustomData is called.

      Solution

      One possible solution is to automatically restart the sync session if a user custom data field used in a role permission is updated.

      Alternatives

      If the solution above is not possible, add a method like "realm.syncSession.restart()" that will preserve all subscriptions to that synced session, but will close and start the session. I know that calling "pause" and "resume" will achieve the same thing, but "resume" doesn't give the idea of starting a new sync session, so it might confuse people (as it did with me).

      Sorry if any of my understanding of this is wrong, please correct me if it's the case.

      How important is this improvement for you?

      I would like to have it but have a workaround

      Feature would mainly be used with

      Atlas Device Sync

            Assignee:
            Unassigned Unassigned
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: