User

interface User

A user holds the user's metadata and tokens for accessing App Services and Device Sync functionality.

The user is used to configure synchronized realms with SyncConfiguration.Builder.

See also

SyncConfiguration.Builder

Types

State
Link copied to clipboard
enum State : Enum<User.State>
A user's potential states.

Functions

equals
Link copied to clipboard
abstract operator override fun equals(other: Any?): Boolean
Two Users are considered equal if they have the same user identity and are associated with the same app.
logOut
Link copied to clipboard
abstract suspend fun logOut()
Log the user out of the Realm App.
remove
Link copied to clipboard
abstract suspend fun remove(): User
Removes the user and any Realms the user has from the device.

Properties

app
Link copied to clipboard
abstract val app: App
The App this user is associated with.
identity
Link copied to clipboard
abstract val identity: String
The server id of the user.
loggedIn
Link copied to clipboard
abstract val loggedIn: Boolean
Returns whether or not this user is still logged into the MongoDB Realm App.
state
Link copied to clipboard
abstract val state: User.State
The State this user is in.