Lager - v5.2.0
    Preparing search index...
    • Function

      Handles user login.

      This function sends an asynchronous request to the server's login endpoint with the user's email and password. If the login is successful, it stores the received authentication token in secure storage and returns a success message. Throws an error if the login fails for any reason, including server errors or incorrect login details.

      login

      Parameters

      • email: string

        The user's email address.

      • password: string

        The user's password.

      Returns Promise<
          undefined
          | { message: undefined | string; title: string; type: string },
      >

      A promise that resolves to an object containing the login response message, or void if an error occurs.

      If there is an error during the request, it is caught and logged.