AuthService class

A service for handling user authentication using Appwrite.

The AuthService class provides methods for registering, logging in, logging out, and retrieving the current user's information using Appwrite's authentication APIs. This service simplifies the interaction with the Appwrite account API for user management.

Constructors

AuthService.new()

Properties

account Account
final
databases Databases
final
hashCode int
The hash code for this object.
no setterinherited
prefs PreferenceHelper
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getCurrentUser() Future<User>
loginUser(String email, String password, {String role = UserRoles.admin}) Future<bool>
Logs in a user with the provided email and password.
logoutUser() Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerUser(String email, String password) Future<bool>
Registers a new user with the provided email and password.
toString() String
A string representation of this object.
inherited

Operators

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