Members
LoggedOut
- the user is logged outLoggedIn
- the user is logged inRemoved
- the user has been removed
Gets this user's associated custom data. This is application-specific data provided by the server.
Type:
object
Convenience wrapper around call_function(name, [args])
Examples::
// These are all equivalent:
await user.call_function("do_thing", [a1, a2, a3]);
await user.functions.do_thing(a1, a2, a3);
await user.functions["do_thing"](a1, a2, a3);
// It it legal to store the functions as first-class values:
const do_thing = user.functions.do_thing;
await do_thing(a1);
await do_thing(a2);
Gets the identity of this user on MongoDB Realm Cloud. The identity is a guaranteed to be unique among all users on MongoDB Realm Cloud .
Type:
string
Is true if the user is logged in. False otherwise.
Type:
boolean
Gets the user's profile (name, email address, etc.).
Type:
object
Gets the user's state which can be one of the following:
Type:
string
Gets this user's refresh token. This is the user's credential for accessing the MongoDB Realm Cloud and should be treated as sensitive data.
Type:
string
Methods
- the provider
- name
- Type:
string
name of the function to call
- args
- Type:
[any, ...]
list of arguments to pass
- credentials
- Type:
Realm.Credentials
- updated user object
Realm.Auth.APIKeys
Returns a provider to interact with API keys.
Returns:Realm.Auth.APIKeys
Calls the named server function as this user.
Parameters:
Promise<Realm.User>
Links a user to another credentials. This is useful when linking different account togteher.
Parameters:
Promise<Realm.User>
Logs out the user.
Promise<Object>
Refresh user's custom data.
Promise<Object>