UserAuthetication class

Collects methods for authenticating users.

Properties

authenticatedUserId Future<int?>
Returns the id of an authenticated user or null if the user isn't signed in.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
signInUser(int userId, String method, {Set<Scope> scopes = const {}}) Future<AuthKey>
Signs in an user to the server. The user should have been authenticated before signing them in. Send the AuthKey.id and key to the client and use that to authenticate in future calls. In most cases, it's more convenient to use the serverpod_auth module for authentication.
signOutUser({int? userId}) Future<void>
Signs out a user from the server and deletes all authentication keys. This means that the user will be signed out from all connected devices.
toString() String
A string representation of this object.
inherited

Operators

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