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

| 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/registerbut 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.

| 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
- User enters username and password, clicks Login
- Backend validates credentials via
POST /lvd/login - If
verified === 1: session is established, redirect to Dashboard - If
verified === 0: show OTP verification step - User enters 6-digit OTP code, clicks Verify
- Backend validates OTP via
POST /lvd/loginwith{username, password, code} - 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?

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