Overview
mgPass supports SMS-based one-time password (OTP) verification via Hubtel. This is used for phone number verification, passwordless sign-in, and as a second factor in MFA flows.How OTP Works
Request OTP
The application requests an OTP for a phone number. mgPass generates a 6-digit code and sends it via Hubtel SMS.
User receives SMS
The user receives an SMS with the code. The message includes the code and a note that it expires in 10 minutes.
Configuration
Configure the Hubtel SMS connector in the mgPass admin console:| Field | Description |
|---|---|
api_key | Hubtel API key |
client_id | Hubtel client ID |
sender_id | SMS sender name (e.g., “mgPass”) |
OTP Parameters
| Parameter | Value |
|---|---|
| Code length | 6 digits |
| Expiry | 10 minutes |
| Max verification attempts | 3 |
| Lockout duration | 15 minutes |
Request an OTP
Verify an OTP
Error Handling
| Error | Description |
|---|---|
invalid_code | The submitted code does not match |
expired | The OTP has expired (after 10 minutes) |
max_attempts | Too many failed attempts, locked for 15 minutes |
rate_limited | Too many OTP requests for this phone number |

