Quick Start Video
Setup Instructions
1
Create Next.js Project
2
Install Dependencies
3
Configure Environment
Create a
.env.local file with your OneSDK credentials:Implementation Guide
1. Create OneSDK Hook
1. Create OneSDK Hook
Create a new file
hooks/useOneSDK.js:2. Create End-to-End Component
2. Create End-to-End Component
Create a new component file
components/EndToEnd.js:3. Add Component to Page
3. Add Component to Page
Update your page file (e.g.,
app/page.js):Component Configuration
- Welcome Form
- Document Form
- Biometrics
Event Handling
Form Events
Form Events
Biometrics Events
Biometrics Events
Best Practices
Error Handling
Always implement proper error handling for both SDK initialization and
component events.
Loading States
Show appropriate loading states during initialization and between component
transitions.
Event Cleanup
Properly clean up event listeners when components unmount to prevent memory
leaks.
Security
Never expose credentials in client-side code. Use environment variables and
server-side token generation.
Remember to handle cleanup in your components by implementing proper
unmounting logic and removing event listeners when components are destroyed.
Troubleshooting
Common Issues
Common Issues
- SDK Initialization Failed: Check your credentials and network connection
- Component Mount Errors: Ensure the container element exists in the DOM
- Event Handler Issues: Verify event names and handler implementations
Debug Tips
Debug Tips