Members
Returns a dictionary of alll users. Users' identity is used as key.
Returns the current user if any.
Client for the email/password authentication provider.
Example:
{
// Creating a new user, by registering via email & password
const app = new Realm.App(config);
await app.emailPasswordAuth.registerUser('john@example.com', 'some-secure-password');
}
Constructor
- config
- Type:
AppConfiguration
The configuration of the app.
If no app id is provided.
Creates a new app and connects to a MongoDB Realm instance.
Parameters:
Throws:
Methods
- credentials
- Type:
Realm.Credentials
Valid Credentials for the user.
- user
- Type:
Realm.User
The user to remove.
- user
- Type:
Realm.User
The user to switch to.
If user is not logged in.
Promise<Realm.User>
Logs in a user.
Parameters:
Promise<Realm.User>
Promise<void>
Removes the user from MongoDB Realm.
Parameters:
Promise<void>
Switches the current user.
Parameters:
Throws:
Type Definitions
- id
- Type:
string
The id of the MongoDB Realm app.
- url
- Type:
string
The URL of the MongoDB Realm end-point.
- timeout
- Type:
number
General timeout (in millisecs) for requests.
- app
- Type:
LocalAppConfiguration
local app configuration
- name
- Type:
string
The name of the app.
- version
- Type:
string
The version of the app.
This describes the options used to create a Realm.App
instance.
Type:
Object
Properties:
This describes the options used for local app configuration.
Type:
Object