The Glow IDV SDK is an embeddable browser component, so it cannot be called directly from React Native — there is no DOM, no iframe and no window.postMessage.Instead, use @glow/idv-react-native. The package hosts the SDK in a WebView, performs the origin check the protocol requires, and hands results back as typed callbacks. You never write a host page or parse a message.
If you are integrating a web front end, follow the Implementation Guide instead. This page is only for React Native.
Best when verification is triggered from a screen that does something else — a settings page, or a "connect your meter" prompt.
import { useGlowIdv } from '@glow/idv-react-native';
function ConnectMeter({ email }: { email: string }) {
const { presentVerification } = useGlowIdv();
const connect = async () => {
const result = await presentVerification({ subject: email });
if (result.status === 'verified') {
await captureConsent(result.token);
} else if (result.status === 'failed') {
showError(result.error.message);
}
// 'cancelled' — the energy consumer dismissed the sheet.
};
return <Button title="Connect my meter" onPress={connect} />;
}
Execution pauses at the await for as long as the energy consumer is in the flow — choosing a method, entering their MPXN or photographing a document, and reading the confirmation screen. Everything after it runs once they are done.presentVerification never rejects. Every outcome resolves as a VerificationResult.
The view grows to fit the flow as it progresses, so place it inside a ScrollView.
Wait for the exit before navigating
onVerified fires when the credential is issued, but the SDK then shows its own confirmation screen — including customisedMessage. Navigating away in onVerified replaces that screen before the energy consumer sees it. Capture the credential there, and move on in onExit.The modal presentation does this for you.
energy-bill-upload opens a camera or photo picker, which the host app must declare.
On iOS a missing usage string is not an error — the operating system terminates the app the moment the picker opens. These entries are required, not optional.
ios/YourApp/Info.plist:
<key>NSCameraUsageDescription</key><string>Used to photograph a document when verifying your address.</string><key>NSPhotoLibraryUsageDescription</key><string>Used to choose a document when verifying your address.</string>
Offering only mpxn-eui-last4 avoids this entirely, and is a reasonable first integration — verification is instant and there is no native permission surface.