AuthUseCase

AuthUseCase class that contains the use cases for the authentication

Constructors

Methods

Constructors

Methods

  • Log in a user

    Parameters

    • email: string

      The email of the user

    • password: string

      The password of the user

    Returns Promise<IUser>

    The user that logged in

    If the user does not exist

    If the password is incorrect

  • Register a new user

    Parameters

    • email: string

      The email of the user

    • password: string

      The password of the user

    Returns Promise<Document<unknown, any, any>>

    The result of the registration