20 lines
1.2 KiB
Markdown
20 lines
1.2 KiB
Markdown
# Change: Retry 19-digit ICCID login with a Luhn check digit
|
|
|
|
## Why
|
|
|
|
Some IoT cards are entered or scanned as a 19-digit ICCID prefix. The asset-verification endpoint requires the 20-digit ICCID, so the first verification cannot return an asset token even though the identifier can be deterministically completed.
|
|
|
|
## What Changes
|
|
|
|
- When a login identifier is exactly 19 numeric characters and starts with `89`, call `/api/c/v1/auth/verify-asset` with the entered value first.
|
|
- If that first request fails or does not return `asset_token`, compute the twentieth digit with the ISO/IEC 7812 Luhn (mod-10) check-digit algorithm and retry verification once using the completed ICCID.
|
|
- Keep the first failure entirely silent to the customer. Only the retry failure is handled by the existing login error flow.
|
|
- Persist and use the successful 20-digit ICCID for the authenticated session without mutating the text in the input field during the silent retry.
|
|
|
|
## Impact
|
|
|
|
- Affected capability: `iccid-login-check-digit-retry` (new)
|
|
- Affected code: `pages/login/login.vue`
|
|
- Affected API: `POST /api/c/v1/auth/verify-asset`
|
|
- No backend API, request payload shape, or shared error handling is changed.
|