Overview
Biometric verification provides an additional security layer using the device's built-in authentication methods (Face ID, Touch ID, or passcode). This feature offers two implementation approaches: full app lock or selective feature protection.
Implementation Options
Option 1: Full App Lock (Despia Editor)
Lock the entire application requiring biometric authentication before the app opens:
-
Go to Despia Editor
-
Navigate to Add-ons
-
Enable Biometric app lock
-
Republish your application
Note: This requires republishing through app stores as it modifies native binary files.
Option 2: Feature-Level Protection (WeWeb)
Protect specific features or actions within your app using WeWeb's visual editor. This guide focuses on this approach.
Prerequisites
-
Install the Despia plugin from the WeWeb Marketplace
-
Verify installation: Assets → Library → look for "Despia Provider"
Implementation Steps
Step 1: Add Despia Plugin Component
-
Click Add in WeWeb editor
-
Switch from Basics to Assets panel
-
Find Despia Provider → Despia native folder
-
Drag the Despia plugin to the top of your page
- Add to every page requiring biometric features
Step 2: Create State Variable
-
Create a new variable named "biometric"
-
Set type to Text
-
Leave default value empty
Step 3: Add Trigger Button
-
Add a button element
-
Label it "Verify" or "Authenticate"
-
Go to Workflows → Add "On click" workflow
-
Add action: Execute component action
-
Component: Despia plugin
-
Action: "Start biometric verification"
-
Step 4: Handle Authentication Result
-
Select the Despia plugin component
-
Go to Workflows → Add new workflow
-
Change trigger from "On click" to "On biometric change"
-
Add action: Change variable value
-
Variable: Select "biometric"
-
Value: Bind to
Event > state
-
Step 5: Use Authentication State
The biometric state returns three possible values:
-
"success": Authentication successful
-
"failure": Authentication failed
-
"unavailable": Biometric not available on device
Use this state to:
-
Show/hide sensitive content
-
Enable/disable actions
-
Trigger conditional workflows
-
Make API calls only after successful verification
Security Considerations
Client-Side vs Server-Side
This WeWeb implementation is client-side security. Important points:
-
Not a replacement for server-side authentication (Xano, Supabase, etc.)
-
Complementary layer to existing authentication systems
-
Protects against casual unauthorized access (someone picking up an unlocked phone)
-
Does not protect against sophisticated attacks or code injection
Best Practices
-
Always combine with server-side authentication: Ensure your backend validates all requests
-
Use for sensitive actions: Payment confirmations, profile deletion, viewing private data
-
Provide fallback options: Handle devices without biometric capabilities
-
Clear user communication: Explain why biometric verification is needed
-
Session management: Consider timeout periods for re-authentication
Real-World Use Cases
Banking & Finance
-
Authorize transactions
-
View account balances
-
Change security settings
Healthcare
-
Access medical records
-
View test results
-
Schedule appointments
Social Apps
-
Delete account/profile
-
Change privacy settings
-
Access private messages
E-commerce
-
Complete purchases
-
Access payment methods
-
View order history
Publishing & Updates
-
Changes made in WeWeb deploy via over-the-air updates
-
No app store resubmission required
-
Updates available immediately to all users
-
No app rebuild necessary for WeWeb changes
Testing
In Development
-
Browser preview won't trigger actual biometric
-
Test on physical devices for real authentication
Device Fallbacks
-
Face ID devices fall back to Touch ID if face not recognized
-
All devices fall back to passcode if biometric fails
-
Simulator testing uses passcode input
Troubleshooting
Authentication always fails
-
Check device has biometric enrolled
-
Verify app permissions in device settings
State not updating
-
Ensure workflow is on the plugin component, not the button
-
Check event trigger is "On biometric change"
Unavailable state
-
Device may not support biometric
-
User hasn't set up Face ID/Touch ID
-
Check device settings
Additional Security Recommendations
For maximum security:
-
Implement server-side session validation
-
Use token-based authentication
-
Add request signing for sensitive operations
-
Implement rate limiting
-
Log authentication attempts
-
Consider multi-factor authentication
For additional support or questions, please contact our support team at support@despia.com