This guide explains the device binding feature, including the key concepts and endpoints required to implement it. Device binding is mandatory for all secure flows, such as those requiring a Qualified Electronic Signature (QES) or two-factor authentication (e.g., BankIdentPlus).
The device binding API allows customers to register their devices and create public/private key pairs for authenticating Multi-Factor Authentication (MFA) challenges.
Device binding is a prerequisite for Strong Customer Authentication (SCA). It ensures that a request originates from a trusted, registered device.
Once a customer binds their device, they receive authentication challenges that they must confirm using that device (e.g., logging in, changing data, authorizing transactions).
Customers authorize actions using one of two key types:
- Unrestricted keys: Do not require specific user authentication to sign a request. These are typically used for background processes or low-risk actions.
- Restricted keys: Require user authentication via biometrics (e.g., Touch ID, Face ID) to access the private key.
- iOS: Combine
privateKeyUsageflagwithuserPresenceortouchIDAny. - Android: Use
setUserAuthenticationParameters().
- iOS: Combine
See the Strong customer authentication guide for the full list of use cases requiring restricted vs. unrestricted keys.
Your implementation must meet the following security standards:
- Limit: Maximum of five registered devices per customer.
- OS: Android 8.0+ or iOS 12+.
- Hardware: Must support hardware-backed security via separate execution environments (e.g., Secure Enclave in iOS, TEE in Android).
- Access Control: Your app must enforce a device passcode or biometric lock.
- Storage: You must store personalized security credentials and cryptographic keys in the secure environment.
Solaris supports two methods for device binding. You must choose the method that fits your use case and platform requirements:
- SMS OTP (Default): Solaris sends a one-time password to the customer's verified mobile number.
- Activation Code (QR): You generate an activation code, convert it to a QR code, and deliver it to the customer (e.g., via snail mail or a secure web interface).
In this flow, you must manage the lifecycle of the activation code before the customer can bind their device. This method allows customers to bind a new device even if they have lost access to their previously bound device.
Select the binding method you wish to implement to see the specific steps.
- Initiation: The customer enters device information in your app.
- Key Generation: Your app generates a private/public key pair in
ecdsa-p256format. - Submission: Send the public key (hex-encoded) and device info to Solaris via POST Create device.
- Challenge: Solaris triggers a verification flow based on your
challenge_type:- SMS: Solaris sends a 6-digit OTP via SMS to the customer.
- QR: Solaris validates the Activation Code logic (no SMS is sent).
- Input: The customer provides the verification data:
- SMS: Customer enters the 6-digit OTP.
- QR: Customer scans the QR code to extract the Activation Code string.
- Signing: Your app creates a signature using the Private Key and the input data (OTP or Activation Code).
- Verification: Send the signature to Solaris via PUT Verify the signature.
- Completion: If valid, Solaris registers the device.
Collect the device information and generate a private/public key pair (ecdsa-p256) on the device.
POST Create device
Call this endpoint to initiate the binding. By default (challenge_type: "sms"), this triggers an SMS OTP to the customer's verified number.
Request URL
POST /v1/mfa/devicesPayload:
{
"person_id": "ec3d16cbc106f481b72d881d90c89cc5cper",
"key_type": "ecdsa-p256",
"key": "04a346c447...",
"key_purpose": "unrestricted",
"name": "iPhone 13",
"challenge_type": "sms"
}Response: Solaris creates a temporary, unverified device and returns a challenge object. The challenge expires in 5 minutes.
The customer enters the 6-digit SMS OTP into your app. You must use this OTP and the stored Private Key to create a cryptographic signature.
How to create the signature:
- Hash: Create a
SHA256hash of the 6-digit OTP. - Sign: Sign the hash using the Private Key.
- Encode: Convert the signature to a Hex string (ASN.1 format).
- Send: Submit the hex string to the
PUT /signatures/{id}endpoint.
PUT Verify the signature
PUT /v1/mfa/challenges/signatures/{id}Response: Returns 204 No Content on success.
After successful binding (via either method), you can add more keys to the device. This is useful if you want to separate keys for different permission levels (e.g., Restricted vs. Unrestricted).
To add a new key, you must sign the request using the existing verified private key.
Request URL
POST /mfa/devices/{id}/keysIn the Sandbox environment, you cannot generate real QR codes or send physical mail. Use these static activation codes to simulate specific scenarios when calling PUT /v1/mfa/challenges/signatures/{id}.
| Scenario | Activation Code String | Expected Result |
|---|---|---|
| Successful Binding | static_activation_code_valid_abcdefghijklmnopqrstuvwxyz123456789 | 204 No Content (Success) |
| Code Expired | static_activation_code_expired_abcdefghijklmnopqrstuvwxyz1234567 | 400 Error (error_code: activation_code_expired) |
| Usage Limit Reached | static_activation_code_usage_limit_exceeded_abcdefghijklmnopqrst | 400 Error (error_code: activation_code_usage_limit_reached) |