FaceGuard
Surt FaceGuard lets you embed face verification for secure login into your web or mobile application. Users complete a quick face scan that compares against their enrolled base photo - all within your app.
1
Get Credentials
API key + workflow ID from your dashboard
2
Generate Token
Server-side call to create a portal token
3
Embed FaceGuard
SDK, iframe, or WebView in your frontend
How It Works
- Your backend requests a portal token from the Surt API
- Your frontend opens FaceGuard (SDK, iframe, or WebView) with that token
- Your user completes the face scan (auto-captures when face is detected)
- Surt sends the result via
postMessageevents
Integration Methods
| Method | Platform | Best for |
|---|---|---|
| NPM Package | Web (React, Vue, etc.) | Fastest integration, auto-detects mobile/desktop |
| iFrame | Web | Full control over sizing and layout |
| React Native | iOS, Android via RN | Mobile apps with React Native |
| Native iOS | iOS (Swift) | Native iOS apps |
| Native Android | Android (Kotlin) | Native Android apps |
Device Behavior
FaceGuard automatically adapts to the device:
- Mobile / Tablet: Opens the camera flow directly for face scanning
- Desktop: Shows a QR code for phone handoff, with a "Verify Here" fallback for webcam
Communication
All integration methods use postMessage for real-time communication. Events include:
surt:ready: FaceGuard is loaded and readyclosewith reason:approved,rejected,canceled,bypass_active,no_base_photo, orerror
Quick Links
- Quick Start: get running in 5 minutes
- Authentication: get your API credentials
- NPM Package: recommended web integration
- API Reference: backend endpoints
- Error Codes: status codes and close reasons