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

Realm Web: User custom data needs to be EJSON deserialized

      Goals & Expected Results

      Users would expect custom data transmitted through the access token to be EJSON deserialized.

      Actual Results

      The data is not EJSON deserialized.

      Steps to Reproduce

      1. Create a collection of documents and enable custom user data.
      2. Create a user and a matching document in the collection which contains an undefined value.
      3. Authenticate the user and read the custom data.
      4. See how the undefined value is returned as {{ { "$undefined": true }

        }} (see https://docs.mongodb.com/manual/reference/mongodb-extended-json-v1/#undefined-type)

      Code Sample

      <!---
      Please provide a code sample or test case that highlights the issue.
      If relevant, include your model definitions.
      For larger code samples, links to external gists/repositories are preferred.
      Full projects that we can compile and run ourselves are ideal!
      -->

      Version of Realm and Tooling

      • Realm JS SDK Version: Realm Web 0.9.0
      • Node or React Native: Web
      • Client OS & Version: N/A
      • Which debugger for React Native: N/A

            Assignee:
            kraen.hansen@mongodb.com Kræn Hansen
            Reporter:
            kraen.hansen@mongodb.com Kræn Hansen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: