Overview
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
Step-Up Authentication
Multi-Factor Authentication
Progressive Enhancement
Pattern 1: Hybrid Authentication
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.Why B2C Needs Email/Password as Primary
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
When to Use This Pattern
Architecture Overview
User Database Schema
User Database Schema
user_id- Primary keyemail- Email addresspassword_hash- Hashed password (existing)uip_id- UIP identity reference (new, nullable)uip_enabled- Boolean flag for UIP statuscreated_at- Account creation timestampuip_linked_at- When UIP was linked
Authentication Flow States
Authentication Flow States
- User logs in with email and password
- After successful login, show prompt to link UIP
- User remains functional without UIP
- User logs in with email and password first
- System requires UIP biometric verification as second step
- Both factors must succeed for access
- User chooses to use UIP as primary authentication
- Email/password retained as recovery method
- Faster login experience with biometric-first flow
Implementation Workflow
Initial Login (Email/Password)
Check UIP Status
uip_enabled = false:- Grant access immediately
- Show optional prompt: “Enable UIP for enhanced security”
- Link to UIP setup flow
uip_enabled = true:- Do NOT grant access yet
- Proceed to Step 3 for biometric verification
Request UIP Verification
- Include user’s
uip_idin request - Specify device type (mobile or desktop)
- Provide webhook URL for receiving result
- Request minimal fields (only need verification confirmation)
- Mobile: App redirect URL
- Desktop: QR code for scanning
Display UIP Prompt
- Display “Open UIP App” button
- Show loading state: “Waiting for biometric verification…”
- Display QR code prominently
- Show instructions: “Scan with UIP app to complete login”
- Add loading indicator
Receive Webhook Confirmation
- Verify webhook signature
- Extract
session_idandstatus - Grant user access to application
- Update frontend to show logged-in state
- Show error message
- Allow user to retry UIP verification
- Optionally provide support contact
Complete Session
- Issue session token/cookie
- Log successful authentication (with both factors)
- Redirect to user’s intended destination
- Store audit trail with both authentication methods used
UIP Linking Flow
For users who don’t have UIP enabled, provide an opt-in flow:Present UIP Benefits
- “Enable biometric login for enhanced security”
- “No more passwords—use your fingerprint or face”
- “Same security as government ID verification”
Initiate UIP Setup
User Completes UIP Setup
- Scans government ID
- Takes biometric selfie
- Confirms identity
Link UIP to Account
- Extract
uip_idfrom webhook payload - Update user record:
uip_id = <received_id>,uip_enabled = true - Show success message: “UIP enabled! Next login will use biometric verification”
User Experience Considerations
Keep UIP Optional
Clear Recovery Path
Subscription Management
Transparent About Keys
Critical: Account Recovery Reality
UIP Recovery Keys: B2C Challenge
UIP Recovery Keys: B2C Challenge
- 60-80% of users won’t save their recovery keys properly
- Users will screenshot keys and lose them when upgrading phones
- Users will save keys in Notes app that doesn’t sync
- Users won’t understand the importance until it’s too late
- Immediate account access without recovery key hunt
- Subscription cancellation always possible (legal requirement)
- Reduces support tickets by 90%+
- User can disable lost UIP and re-enable on new device
Support Scenarios You'll Face
Support Scenarios You'll Face
- “I got a new phone and can’t log in to cancel my subscription”
- “I deleted the UIP app by accident, now I’m locked out”
- “My phone was stolen and I need to update my credit card”
- “I never saved those keys you mentioned, can you help?”
- “My mom needs to manage my account but I’m in the hospital”
Security Benefits
Phishing Protection
Phishing Protection
Account Takeover Prevention
Account Takeover Prevention
Audit Trail
Audit Trail
Compliance Ready
Compliance Ready
Pattern 2: Step-Up Authentication
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.When to Use This Pattern
How It Works
Standard Login
Trigger Point
Request Step-Up
Verify and Proceed
Example Trigger Points
Financial
Account Changes
Data Access
Benefits
Reduced Friction
Reduced Friction
Risk-Based Security
Risk-Based Security
Regulatory Compliance
Regulatory Compliance
Pattern 3: Multi-Factor Authentication (MFA)
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.When to Use This Pattern
How UIP Improves Traditional MFA
Stronger Than SMS
Better Than TOTP Apps
Government Verification
Audit Trail Included
Implementation
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.Pattern 4: Progressive Enhancement
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.When to Use This Pattern
Why This Works for B2B, Not B2C
B2B: Professional User Behavior
B2B: Professional User Behavior
- Have IT support to help with account recovery
- Understand importance of backup credentials
- Work from managed devices with backup systems
- Face consequences for losing access (can’t do their job)
- Are trained on security best practices
B2C: Different Reality
B2C: Different Reality
- Have no IT support—only your customer service
- Don’t save recovery keys or understand their importance
- Upgrade phones frequently and lose credentials
- Need to cancel subscriptions on a whim (legal requirement)
- Expect “forgot password” to solve everything
User Flow (B2B Context)
Primary: UIP First
Fallback Available
Recovery Key Education
IT Support Integration
Benefits (B2B/Enterprise)
Maximum Security
Maximum Security
Better User Experience
Better User Experience
Reduced IT Costs
Reduced IT Costs
Choosing the Right Pattern
By Application Type
- B2C Applications
- B2B / Enterprise
Pattern 1: Hybrid Auth
- You have subscriptions or purchases
- Users need guaranteed account access
- Recovery key management is unreliable
Pattern 2: Step-Up Auth
- Most actions are low-risk
- Only financial/sensitive operations need extra security
- Want to balance convenience and protection
Quick Decision Matrix
| Your Context | Recommended Pattern | Why |
|---|---|---|
| B2C app with subscriptions | Pattern 1: Hybrid | Users need guaranteed access to cancel/manage |
| B2C app with sensitive actions | Pattern 2: Step-Up | Security only when necessary, minimal friction |
| B2B replacing SMS codes | Pattern 3: MFA | Stronger than SMS, same flow, better UX |
| Enterprise internal tools | Pattern 4: Progressive | IT support + trained users = UIP-first works |
| Banking/Financial (any) | Pattern 3: MFA | Compliance + audit trail + legal defensibility |