AuthViewModel

class AuthViewModel @Inject constructor(loginUseCase: LoginUseCase, registerUseCase: RegisterUseCase, validators: Validators) : ViewModel

ViewModel for managing authentication-related logic and data.

This ViewModel is annotated with HiltViewModel for Dagger-Hilt integration.

Constructors

Link copied to clipboard
@Inject
constructor(loginUseCase: LoginUseCase, registerUseCase: RegisterUseCase, validators: Validators)

Creates an instance of AuthViewModel.

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun login()

Initiates the user login process using the provided credentials.

Link copied to clipboard
fun logout()

Logs out the current user.

Link copied to clipboard

Handles updates to the authentication form state based on the provided AuthenticationFormEvent.

Link copied to clipboard

Initiates the user registration process using the provided registration details.

Link copied to clipboard

Toggles the visibility of the password input field.