@onefootprint/footprint-expo-camera-module
v0.2.0
Published
Native document capture for Expo apps using the Footprint platform
Readme
@onefootprint/footprint-expo-camera-module
Native document + selfie capture for the Footprint Expo SDK. Add it to collect ID documents inline in your own app, without the hosted webview.
Install
Install the SDK, this bridge, and the native camera implementation together:
npm install @onefootprint/footprint-expo \
@onefootprint/footprint-expo-camera-module \
@onefootprint/footprint-native-camera-moduleConfig plugin
Add the config plugin to app.json — it injects the iOS camera / photo-library
usage descriptions and the Android camera / storage permissions:
{
"expo": {
"plugins": [
[
"@onefootprint/footprint-expo-camera-module",
{
"cameraPermission": "Take a photo of your ID",
"photoLibraryPermission": "Pick an ID photo from your library"
}
]
]
}
}Then run npx expo prebuild --clean — React Native autolinking wires up the
native modules (no manual iOS/Android setup).
Usage
Pass the module's cameraModule export to the SDK; the SDK drives the capture
and the upload:
import { footprint } from "@onefootprint/footprint-expo";
import { cameraModule } from "@onefootprint/footprint-expo-camera-module";
await footprint.initialize("obtok_...", { cameraModule });
// when a document requirement is pending:
const result = await footprint.captureDocument({ kind: "passport", countryCode: "US" });
// result.uploadedSides -> e.g. ["front", "selfie"]See the native onboarding guide for the full flow (initialize → identify → collect → process).
Requirements
Expo SDK 53+, React 19+, React Native 0.70+. Requires
@onefootprint/footprint-native-camera-module (peer).
License
MIT
