* When refreshing the token, look up the user in a way that doesn't suffer
from #1586
Expose a means of looking up a user by identity and server to avoid
problems if the same user identity exists for multiple servers, which
can happen when connecting to the same server via different hostnames.
* Return undefined if the user doesn't exist rather than returning an object wrapping a null SyncUser.
* Perform a pseudo-refresh for admin token users
Although we don't need to actually refresh the token, when multiplexing is
enabled we do still need to hit ROS to let it know we're accessing a Realm and
get the sync label.
* Adding brief JSdoc and TS definition for isAdminToken.
* Perform a pseudo-refresh for admin token users
Although we don't need to actually refresh the token, when multiplexing is
enabled we do still need to hit ROS to let it know we're accessing a Realm and
get the sync label.
* Adding brief JSdoc and TS definition for isAdminToken.
* Make the timeout consistent
* Add basic docs for multiprocess notifications (#1594)
* Add basic docs for multiprocess notifications
* Adopt core's query parser and update to core v5.1.2 (#1563)
* Adopt core's query parser.
* Realm Core 5.1.2
* Realm Sync 2.2.9
* Remove tar.xz (#1585)
* remove tar.xz decompression and lzma deps
* Fixing merge
* Updating object store
This is for internal use by ROS as part of its support for failover. If
the session is active, we ask it to disconnect then reconnect to the new
server. We also stash away the overridden server's details so it can be
used again we later disconnect and reconnect. If the session is not yet
active, we simply stash away the details to be used when establishing
the connection.
* Fix an unused variable warning in js_sync.hpp
* Add support for aggregates on arrays of primitives
* Update documentation and typescript declarations
* Update collection.js
* origin/master: (23 commits)
Fix api doc error
fix progress notifications registrations
Fix typo in Github issue template
Fix port conflict between RN >= 0.48 and RPC server (#1294)
Disable testAddListener when running in chrome
Ensure RN has an event loop running for async tests
Make permission tests better handle server delays
Fix race conditions in testAddListener
Separate build and test steps in xcode to reduce chance of hitting "Early unexpected exit"
Ignore errors when sourcing nvm.sh
Don't forward arguments to nvh.sh
Skip sourcing nvm.sh if it's already available
Fix some shellcheck warnings
Ensure node 6.5.0 is installed on CI
Build realm from source for each test-runner test
Improve error reporting for incorrect argument counts for Realm methods
Use the same error messages in the RPC code as the regular code
Silence an unused variable warning when building with sync disabled
Check the exception message in all Realm tests which assert an exception is thrown
Don't discard the actual error message in validated_get_X
...
The callback is used to let JS code decide whether the server's SSL
certificate should be accepted or rejected. The ssl_verify_callback
function is only applicable for platforms using OpenSSL.
The JS binding used to conflate `SyncUser::is_admin()` with the user being created by calling `Realm.Sync.User.adminToken()`, but now that we expose a user’s role on the server under `is_admin()` this supposition is no longer correct.
#1097 attempted to fix one such case, but fixing it only uncovered another: in `UserClass<T>::all_users()`. I’ve gone through all the callsites of `SyncUser::is_admin()` to make sure they don’t assume an admin token user.
* Get a session’s error handler
* Change the signature of all methods to add the callee
* Deserialize rpc callbacks
* Expose the session error handle on its config property
* When a token refresh error occurs and there is a session error handler
propagate the error to the handler