UIP is designed to integrate seamlessly with your existing authentication and signing infrastructure. This guide presents proven integration patterns to help you choose the right approach for your specific use case.
Hybrid Authentication
Add UIP as enhanced security alongside existing email/password systems
Step-Up Authentication
Start with basic auth, require UIP for sensitive operations
Multi-Factor Authentication
Use UIP as a second factor for high-security scenarios
Progressive Enhancement
Offer UIP as the primary option with traditional fallback
Use Case: You have a B2C application and want to add UIP as enhanced security while keeping email/password as the primary authentication and recovery method.
Critical for B2C: UIP recovery requires users to save two unique recovery keys. B2C users are notoriously unreliable with credential management — they lose keys, forget to save them, or don’t understand their importance.Real-world scenarios where users need email/password:
Lost phone or device replacement
Forgot to save UIP recovery keys
Need to cancel or update subscriptions without UIP access
Device stolen or damaged
Family member needs to manage account in emergency
User deleted UIP app accidentally
Without email/password fallback, you’ll face:
Massive support overhead dealing with locked-out users
Subscription cancellation issues (legal requirement to allow this)
User frustration and churn
Inability to recover accounts for legitimate users
For B2C, email/password must remain the primary authentication method, with UIP as an optional security enhancement.
User enters email and password as usual. Your system validates credentials against existing database.Success: Proceed to Step 2
Failure: Show error and allow retry
2
Check UIP Status
After password verification, check if user has linked UIP:If uip_enabled = false:
Grant access immediately
Show optional prompt: “Enable UIP for enhanced security”
Link to UIP setup flow
If uip_enabled = true:
Do NOT grant access yet
Proceed to Step 3 for biometric verification
3
Request UIP Verification
Call the Identify API to request biometric authentication:API Call:
Include intent describing the verification
Request minimal fields (only need verification confirmation)
Response:
session_id, qr_code (base64 PNG), expires_at
4
Display UIP Prompt
Show appropriate UI based on device type:Mobile Flow:
Display “Open UIP App” button linking to https://www.uip.id/{session_id}
Show loading state: “Waiting for biometric verification…”
Desktop Flow:
Display QR code prominently (from qr_code in API response)
Show instructions: “Scan with UIP app to complete login”
Add loading indicator
5
Poll for Completion
Poll GET /v1/identify/:id every 2-3 seconds until status is completed.On Success:
Extract uip_id and audit_id from the response
Grant user access to application
Update frontend to show logged-in state
On Failure/Expired:
Show error message
Allow user to retry UIP verification
6
Complete Session
Create authenticated session for user:
Issue session token/cookie
Log successful authentication (with both factors)
Redirect to user’s intended destination
Store audit trail with both authentication methods used
NEVER force UIP adoption. B2C users need the freedom to manage their accounts with email/password alone, especially for critical actions like subscription cancellation.
Clear Recovery Path
Always provide obvious “Use email/password instead” options. When users lose UIP access, they need immediate recovery without contacting support.
Subscription Management
Ensure users can cancel subscriptions, update payment methods, and manage billing with email/password alone. Legal requirements in many jurisdictions mandate easy cancellation.
Transparent About Keys
If promoting UIP, be honest about recovery key requirements. Many B2C users will ignore this step, so email/password fallback is essential.
Even if an attacker steals the user’s email and password, they cannot complete authentication without the user’s biometric verification on their registered device.
Account Takeover Prevention
Credential stuffing and brute force attacks are ineffective because the second factor (biometric) cannot be remotely compromised.
Audit Trail
Every UIP authentication includes government-verified identity, precise timestamp, and device information — creating a complete audit trail.
Compliance Ready
Meets requirements for multi-factor authentication in regulated industries like finance, healthcare, and government services.
Use Case: Allow basic login with email/password for low-risk operations, but require UIP verification when users attempt sensitive actions like large transfers, account changes, or data exports.
User logs in with email/password for basic account access. Grant access to low-risk features immediately.
2
Trigger Point
When user attempts sensitive operation (wire transfer, account settings change, data export), intercept the action.
3
Request Step-Up
Call the Identify API to request biometric verification. Show the QR code or deep link button depending on device.
4
Poll and Verify
Poll GET /v1/identify/:id until completed. Only after successful UIP verification, allow the sensitive operation to complete. Log both the action and the verification for audit purposes.
Use Case: Use UIP as the second factor in a traditional multi-factor authentication flow, replacing SMS codes or authenticator apps with government-verified biometric authentication.
Replace SMS/TOTP verification step with UIP call. User authenticates with username/password, then completes second factor via UIP biometric scan instead of entering a code. Poll GET /v1/identify/:id until completed.
Use Case: Offer UIP as the primary, recommended authentication method while maintaining traditional email/password as a fallback. Best for B2B, enterprise, or high-security applications — not recommended for general B2C.
Enterprise internal tools with IT support available
High-security contexts where users understand credential management
Users are incentivized to protect their accounts (financial, professional)
Not recommended for B2C applications where users manage subscriptions, make purchases, or need guaranteed account access. See Pattern 1 (Hybrid Authentication) for B2C best practices.
Use Case: Build a platform that makes UIP API calls on behalf of multiple businesses. Instead of each business integrating UIP directly, your platform handles the integration once and serves all customers.