Skip to main content

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

  1. Your backend requests a portal token from the Surt API
  2. Your frontend opens FaceGuard (SDK, iframe, or WebView) with that token
  3. Your user completes the face scan (auto-captures when face is detected)
  4. Surt sends the result via postMessage events

Integration Methods

MethodPlatformBest for
NPM PackageWeb (React, Vue, etc.)Fastest integration, auto-detects mobile/desktop
iFrameWebFull control over sizing and layout
React NativeiOS, Android via RNMobile apps with React Native
Native iOSiOS (Swift)Native iOS apps
Native AndroidAndroid (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 ready
  • close with reason: approved, rejected, canceled, bypass_active, no_base_photo, or error