realm-js icon indicating copy to clipboard operation
realm-js copied to clipboard

Realm Web: User custom data needs to be EJSON deserialized

Open kraenhansen opened this issue 4 years ago • 0 comments

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

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

kraenhansen avatar Oct 09 '20 13:10 kraenhansen