Skip to main content

Usage

Create a Mobile-ID transaction with provider: mobileID and method: auth, passing the user's phone number and national identity number. Both are required to start the request; eID Hub can't show the user a number-entry step itself.

Phone number and national identity number

Set the phone number in international format (for example +37269930366) and the matching national identity number. These are looked up against the user's Mobile-ID certificate, so they need to be correct and belong to the same person; a mismatch fails the transaction rather than prompting the user to retry.

Language and display text

Set the language used in the dialog shown on the user's phone: Estonian, Russian, English or Lithuanian. Optionally add a short display text (up to 100 characters, GSM-7 encoding) shown alongside your name and the verification code, for example to say what the user is authenticating into.

Verification code

Once the request is sent, eID Hub returns a four-digit verification code. The Mobile-ID app shows the same code to the user on their phone; eID Hub's frontend displays it automatically so the user can compare the two before approving. Showing this code is part of the standard Mobile-ID flow, not an optional extra: skipping it removes a check against man-in-the-middle attacks.

Completion data

Mobile-ID authentication runs asynchronously: the user can take anywhere from a couple of seconds to the full timeout window to respond on their phone, so eID Hub polls for the result in the background. Once it completes, completion data includes the end result and, on success, the user's name, given name, surname and country as read from their certificate. See the API reference for the full list of fields.

End results

Alongside a successful result, Mobile-ID can report: timeout (the user didn't respond), the user has no active Mobile-ID, the user cancelled, a signature hash mismatch, the phone being out of coverage, an SMS delivery error or a SIM application error.