AuthenticationSingleton

@Singleton
object AuthenticationSingleton

Singleton object responsible for managing user authentication state and related operations.

The AuthenticationSingleton object provides properties and methods to track user authentication status, validate user credentials, retrieve the user's remote ID, and handle user logout.

Properties

Link copied to clipboard

Indicates whether the user is currently authenticated.

Link copied to clipboard

Functions

Link copied to clipboard
fun logout()

Logs out the user by resetting the authentication status and removing stored credentials.

Link copied to clipboard

Validates user authentication status based on the presence and validity of the stored token. If the token is valid, sets isUserAuthenticated to true; otherwise, logs out the user.