Skip to content

Login Page

The Login page is the entry point to the application, allowing users to authenticate using their credentials.

Overview

The Login page provides a simple form where users can input their username and password. Upon successful login, a session cookie is set by the backend to maintain authentication.

Main Variables

  • errorMessage: Stores error messages to display when login fails.
  • locale: Tracks the current language of the application.
  • isLoading: Indicates whether the login request is in progress.

Functions

  • esLangChange: Changes the language to Spanish and updates the UI.
  • enLangChange: Changes the language to English and updates the UI.
  • login: Handles the login process by sending the username and password to the backend. Redirects to the dashboard on success or displays an error message on failure.
  • checkLang: Checks the current language from cookies and updates the UI accordingly.

Notes

  • The page uses the Widget component to display the login form.
  • Language selection is implemented using cookies.
  • The backend sets a session cookie upon successful login.