IDVerse IDKit
IDVerse IDKit is an identity verification solution that integrates with OneSDK. This guide walks you through the integration process and explains key concepts.
Quickstart
IDKit steps will trigger when IDV module’s mount method is called. For that reason it is expected that mount is called immediately by the host application.
A typical sequence to use IDVerse IDKit with OneSDK is as follows:
// 1. Generate authentication token
const token = await generateTokenUsingMachineToken();
// 2. Configure session
const sessionConfig = {
session: {
token,
appReference: "your-app-name", // Required for UI styling
persist: true // Enable session persistence
}
};
// 3. Initialize and mount
const oneSdk = await OneSdk(sessionConfig);
const idvFlow = oneSdk.flow("idv");
idvFlow.mount("container-id");
How It Works
1. Initialization
- Your application generates a unique customer reference URL (e.g., /onboarding/[customer_reference])
- Your backend creates a machine session with this reference
- OneSDK initializes using the session data
session.persist
(storing the session details in browser cache for 1 hour) andsession.appReference
- The IDV module mounts and redirects to IDKit's verification interface
2. Verification Flow
- User completes identity verification on IDKit's interface
- FrankieOne then records the verification status
- User returns to your application
- The IDV module processes results and emits appropriate events
idv.mount
will request the FrankieOne backend to check if a prior success flag has been stored. If it has, it will skip initalisation.idv.mount
will then request FrankieOne backend service to proceed with the IDV Processing.idv.mount
will then emit “results”, or another of the events described in Events/Outcomes.
Important Implementation Notes
Session Persistence
As IDKit requires browser redirects, OneSDK implements session persistence to maintain state:
- Sessions are stored in local storage for 1 hour
- Persisted data includes:
- Session ID
- Entity identification
- Flow state
- Unprocessed data
Mounting Considerations
- The mount point parameter is required for API consistency but isn't used for rendering
- You can use an orphaned element if needed:
const container = document.createElement("div");
idvFlow.mount(container);
UI/UX Implications
- Browser Navigation
- URL changes during verification process
- Users will see IDKit's domain during verification
- UI Customization: the host application has no control over the theme of the vendor UI, and any customisations need to be done directly with IDKit:
- Styling is controlled via appReference in session config
- Direct UI modifications should be coordinated with IDKit
Event Handling
The IDV module emits various events during the verification process. Implement handlers for:
- Verification completion
- Error scenarios
- User cancellation
- Progress updates
idvFlow.on("results", (results) => {
// Handle verification results
});
Best Practices
- Call
mount()
immediately after initialization - Always enable session persistence (
session.persist: true
) - Implement proper error handling for network issues and timeouts
- Store customer reference for session recovery
- Test the complete flow, including redirects and session restoration
Troubleshooting
Common issues and solutions:
- Session expiration (1-hour limit)
- Missing appReference
- Incorrect mount implementation
- Redirect handling errors
Updated 23 days ago