Related Classes
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({ email: 'john@example.com', password: 'some-secure-password' });
}
Constructor
- configOrId
- Type:
AppConfiguration
orstring
The configuration of the app or a string app id.
If no app id is provided.
Creates a new app and connects to an Atlas App Services instance.
Parameters:
Throws:
Methods
- callback
- Type:
function
- user
- Type:
Realm.User
The user to delete.
- appId
- Type:
string
- credentials
- Type:
Realm.Credentials
Valid Credentials for the user.
- callback
- Type:
function
- user
- Type:
Realm.User
The user to remove.
- user
- Type:
Realm.User
The user to switch to.
If user is not logged in.
Adds a listener that will be fired on various user events. This includes login, logout, switching users, linking users and refreshing custom data.
Parameters:
Promise<void>
Deletes the user. NOTE: This irrecoverably deletes the user from the device as well as the server!
Parameters:
Promise<void>
Realm.App
Returns an instance of an app. If an app with the specified id hasn't been created, a new app instance will be created.
Parameters:
Realm.App
Promise<Realm.User>
Logs in a user.
Parameters:
Promise<Realm.User>
Removes an event listener (see addListener
)
Parameters:
Removes all event listeners
Promise<void>
Removes the user from the client.
Parameters:
Promise<void>
Switches the current user.
Parameters:
Throws:
Type Definitions
- id
- Type:
string
The id of the Atlas App Services application.
- baseUrl optional
- Type:
string
The base URL of the Atlas App Services server.
- timeout optional
- Type:
number
General timeout (in millisecs) for requests.
- baseFilePath optional
- Type:
string
Specify where synced Realms and metadata is stored. If not specified, the current work directory is used.
- app optional
- 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