You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In addition to this, it would be valuable to create a Realm.Sync.User from a JSON representation. This could be implemented with a fromJSON method on the user.
Actual Results
Serializing a Realm.Sync.User (JSON.stringify(user)) gives you the string representation of an empty object ({}) and the fields of a User are all implemented as getters that cannot be set.
Steps to Reproduce
Login or register a user through the Realm Object Server.
Serialize the user using JSON.stringify(user)
Observe the disappointing result
Code Sample
See "Expected Results"
Version of Realm and Tooling
Realm JS SDK Version: 2.0.0-rc5
The text was updated successfully, but these errors were encountered:
Goals
In a multi process environment, like an electron app, it would be valuable to be able to pass users between processes in a serialized form.
Expected Results
I would expect that when logging in to ROS and serializing the resulting user I would get an object as follows:
This could be fixed by implementing a
toJSON
method on theRealm.Sync.User
class: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#toJSON()_behaviorIn addition to this, it would be valuable to create a
Realm.Sync.User
from a JSON representation. This could be implemented with afromJSON
method on the user.Actual Results
Serializing a Realm.Sync.User (
JSON.stringify(user)
) gives you the string representation of an empty object ({}
) and the fields of aUser
are all implemented as getters that cannot be set.Steps to Reproduce
JSON.stringify(user)
Code Sample
See "Expected Results"
Version of Realm and Tooling
2.0.0-rc5
The text was updated successfully, but these errors were encountered: