Skip to content

Authentication: Login & Forgot Password

Overview

The LVD Portal authenticates partners via username and password. If the account is unverified, an OTP verification step is required. The portal also supports password reset via OTP sent to the registered email.

Navigate to: https://[domain]/lvd/auth/login


Login Screen

Login

Field Required Notes
Username Yes Partner account username
Password Yes Show/hide toggle available

Login button submits credentials to POST /lvd/login.

Other elements on this screen:

  • Forgot Password? link below the password field
  • Registration exists via POST /lvd/register but is not exposed in the navigation

OTP Verification Step

If the account's verified status is 0 (unverified), the login response triggers an OTP verification step.

OTP Verification

Element Description
OTP input 6-digit code field
Resend timer 180-second countdown before resend is enabled
Verify button Submits the OTP via POST /lvd/login with {username, password, code}

!!! info "OTP Details" The OTP is 6 digits and has a 180-second resend cooldown. The OTP login uses the same POST /lvd/login endpoint, adding the code parameter to the request body.


Full Login Flow

  1. User enters username and password, clicks Login
  2. Backend validates credentials via POST /lvd/login
  3. If verified === 1: session is established, redirect to Dashboard
  4. If verified === 0: show OTP verification step
  5. User enters 6-digit OTP code, clicks Verify
  6. Backend validates OTP via POST /lvd/login with {username, password, code}
  7. Session established, redirect to Dashboard

Session Management

Endpoint Method Description
/lvd/authuser GET Validates current session on app load
/lvd/logout POST Ends the current session

On successful login, the token is stored in react-secure-storage (encrypted localStorage). The session is validated on each page load via authService.getSession().


Forgot Password

Navigate to: Login → Forgot Password?

Forgot Password

The password reset flow uses the shared iDARMS authentication endpoints:

Step Endpoint Description
1. Request reset POST /auth/forgotpassword Sends OTP to registered email
2. Enter OTP 6-digit verification code
3. Reset password POST /auth/passwordreset Submits new password with OTP

!!! tip "Things to check" - Wrong credentials show a clear error message, not a silent failure - Password field masks input by default and toggles visibility correctly - OTP resend is disabled for 180 seconds after each send - An expired or incorrect OTP shows a clear error - After successful password reset, the old password no longer works - Session is fully cleared on logout — re-opening requires fresh login - GET /lvd/authuser correctly validates an active session on page reload