• Signs in a user using their email and password credentials.

    Sends a POST request to the authentication endpoint to validate credentials.

    Parameters

    • email: string

      The user's email address.

    • password: string

      The user's password.

    Returns Promise<{ error?: string; token?: string }>

    An object containing either the user token on success, or an error message on failure.