Guides
Native Integration
Load session_url directly in a native WebView. The widget sends the same
events as the web integration through a native bridge.
| Platform | Event bridge |
|---|---|
iOS WKWebView | Provide a handler for the ReactNativeWebView.postMessage(json) shim. |
Android WebView | Add a JavaScript interface named PrivyAndroid. The widget calls PrivyAndroid.postMessage(json). |
Bridge messages are front-channel notifications for the user interface. They do not query the backend session status.
The bridge receives JSON in this form:
Code
Trusted-host payload
A native WebView is a trusted host and receives the complete payload. The payload can contain:
exchange_codefor server-to-server exchange.tokenwith the verified-data JWT.sectionswith the shared-data preview.
Prefer the exchange-code flow. It prevents the token from traveling through the front channel. Always verify the JWT on the merchant backend. With the Identity package, decrypt
my_identityon the backend after JWT verification.
See Camera and Permissions for the liveness-camera contract.
Last modified on
