Mobile WebView

Show a Certivant verification in a React Native or Flutter app — WebView settings, camera permissions and the same events as the web SDK, with sample code.

A native app shows the same hosted pages as the web SDK in a WebView. A native WebView is not a website, so it needs no entry in Embedding — that setting only controls which websites may frame your pages.

  1. Your server creates the verification with the REST API and returns the hosted token to the app. Never ship an API key in an app.

  2. The app opens https://<certivant-host>/verify/<token>?embed=1 in a WebView with camera and microphone allowed.

  3. With ?embed=1 the page posts the versioned envelope to the host app:

    { "source": "certivant", "version": 1, "type": "step", "payload": { "step": "upload" } }
    
PlatformWhere the message arrives
React Native (react-native-webview)onMessage — event.nativeEvent.data is the JSON text
Flutter (webview_flutter)the CertivantBridge JavaScript channel — onMessageReceived
iOS WKWebViewWKScriptMessageHandler registered as certivant
Android WebViewadd a JavaScript interface named CertivantBridge with postMessage(String)

Event types and payloads are the same as the web SDK events. Always check source === "certivant" and version === 1, and act only on messages from the WebView you created.

React Native

<WebView
  source={{ uri: `https://app.certivant.com/verify/${token}?embed=1` }}
  originWhitelist={["https://app.certivant.com"]}
  javaScriptEnabled
  domStorageEnabled
  allowsInlineMediaPlayback
  mediaPlaybackRequiresUserAction={false}
  mediaCapturePermissionGrantType="grant"
  geolocationEnabled
  onMessage={(e) => handle(JSON.parse(e.nativeEvent.data))}
/>

Declare CAMERA and RECORD_AUDIO in the Android manifest and NSCameraUsageDescription / NSMicrophoneUsageDescription in Info.plist, and request the permissions at runtime before showing the screen.

Flutter

final controller = WebViewController()
  ..setJavaScriptMode(JavaScriptMode.unrestricted)
  ..addJavaScriptChannel('CertivantBridge',
      onMessageReceived: (m) => handle(jsonDecode(m.message)))
  ..setOnPlatformPermissionRequest((request) => request.grant())
  ..loadRequest(Uri.parse('https://app.certivant.com/verify/$token?embed=1'));

Use permission_handler for the camera, microphone and location prompts.

Sample code

Ready-to-adapt wrappers live in the repository under samples/certivant-embed/ (react-native/ and flutter/), next to the Live ID mobile samples for Android, iOS and .NET MAUI.

For a hosted verification the final complete status is submitted — the decision follows. Use the webhooks on your server to learn the outcome.