@yoshteq/ti365-ts-sdk
    Preparing search index...

    Class AuthenticationService

    Service for handling authentication operations in the Ti365 system. Provides functionality for user login, MFA confirmation, and session management. Uses SRP6a (Secure Remote Password) protocol for secure password authentication.

    Index

    Methods

    • Authenticates a user with the Ti365 backend using username and password. Implements SRP6a (Secure Remote Password) protocol for secure password authentication without exposing the password to the backend.

      Parameters

      • username: string

        The Ti365 username

      • password: string

        The Ti365 password

      Returns Promise<LoginResult>

      A Promise that resolves to a LoginResult containing either a session or status

      • Uses SRP6a for secure password authentication
      • Handles MFA requirements if enabled
      • Synchronizes time with the server
    • Confirms multi-factor authentication (MFA) with a PIN code. Must be called after a successful login that returned MFA_REQUIRED status.

      Parameters

      • mfaPin: string

        The MFA PIN code to confirm

      Returns Promise<LoginResult>

      A Promise that resolves to a LoginResult containing either a session or status

      Error if login() hasn't been called first

      • Resets device identification if MFA tries are exceeded
      • Clears stored password after successful confirmation