User class Application

This class represents a user in an Atlas App Services application. A user can log in to the server and, if access is granted, it is possible to synchronize the local Realm to MongoDB Atlas. Moreover, synchronization is halted when the user is logged out. It is possible to persist a user. By retrieving a user, there is no need to log in again. Persisting a user between sessions, the user's credentials are stored locally on the device, and should be treated as sensitive data.

Properties

accessToken String
Gets the access token for this User. This is the user's credential for accessing Atlas App Services and should be treated as sensitive data.
no setter
apiKeys ApiKeyClient
Gets an ApiKeyClient instance that exposes functionality for managing user API keys. API Keys Authentication Docs
no setter
app App
The App with which the User is associated with.
no setter
changes Stream<UserChanges>
Gets a Stream of UserChanges that can be used to receive notifications when the user changes.
no setter
customData → dynamic
The custom user data associated with this User.
no setter
deviceId String?
Gets an unique identifier for the current device.
no setter
functions FunctionsClient
Gets a FunctionsClient instance that exposes functionality for calling remote Atlas Functions. A FunctionsClient instance scoped to this User. Atlas Functions Docs
no setter
hashCode int
The hash code for this object.
no setterinherited
id String
Get this User's id on MongoDB Atlas.
no setter
identities List<UserIdentity>
Gets a collection of all identities associated with this User.
no setter
profile → UserProfile
Gets the profile information for this User.
no setter
refreshToken String
Gets the refresh token for this User. This is the user's credential for accessing Atlas App Services and should be treated as sensitive data.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state UserState
The current state of this User.
no setter

Methods

linkCredentials(Credentials credentials) Future<User>
Links this User with a new User identity represented by the given credentials.
logOut() Future<void>
Removes the User's local credentials. This will also close any associated Sessions.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refreshCustomData() Future
Refreshes the custom data for a this User.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override