Singleton class responsible for user authentication and session management.
readonly
currentUser: User | undefined
Gets the currently logged-in user.
private
readonly
repo: AuthRepository
Fetches the authentication repository.
checkPermission(perm: Permission): boolean
Checks if the current user has the specified permission.
private
clearSavedData(): void
Clears saved authentication data from the store and session storage.
getUserToken(): string | undefined
Retrieves the current user's authentication token.
Logs in a user with the provided email and password.
logOut(): void
Logs out the current user and clears session data.
Resets the user's password.
useCurrentUser(): User | undefined
React hook that retrieves the currently authenticated user from the global store.
readonly
instance: AfloatAuth
Gets the singleton instance of AfloatAuth.
private
_instance: AfloatAuth