Code Samples for Web Integrations
Overview of available code samples and their related documentation.
Core Module Integrations
These examples refer only to the Incode core modules: ID Validation and Face Match.
| Code Sample | Guide / Tutorial | Code Sample Repository |
|---|---|---|
| Vanilla Javascript | How-to use Web SDK | onboarding-core-javascript |
| React JS (Clean) | onboarding-core-react | |
| Next.js | NextJs Integration Guide | onboarding-core-nextjs |
Extended Integrations
These examples refer to the core modules as well as other modules that extend your Incode onboarding integration: Desktop-to-mobile redirection, Device fingerprint, User consent.
| Code Sample | Guide / Tutorial | Code Sample Repository |
|---|---|---|
| Extended Onboarding Example in React using Typescript | Guide | onboarding-extended-react |
| Extended Onboarding Example in Vanilla Javascript | onboarding-extended-javascript |
Web Authentication Example
| Code Sample | Guide / Tutorial | Code Sample Repository |
|---|---|---|
| Vanilla JS Web Authentication | Face Authentication | authentication-javascript |
Low-Code Integration Examples
| Code Sample | Guide / Tutorial | Code Sample Repository |
|---|---|---|
| Redirect and Back | Redirect and Back | onboarding-lowcode-redirect |
| Embedded Iframe | Embedded Iframe | onboarding-lowcode-iframe |
Backend Sample Server
All our front end samples require a working back end that communicates directly with the Incode Omni API. The following link lets you see a backend sample server that goes along with the preceding front end samples. This sample has endpoints used in one or more types of integrations.
Considerations
Use HTTPS for local development
The sample server exposes itself in thehttp://localhost:3000/. It won't directly work for you during development.
You must be able to access the sample server from your phone in your local network. That means stricter CORS rules will be applied. Browsers relax CORS rules when pointing to localhost, but apply them fully when pointing to an IP address. This also means you will be required to access it trough HTTPS.
Most of our samples are created with Vite and configured to proxy http\://localhost:3000/ into https://your-local.ip/api. This ensures the samples don't run into CORS issues when running locally.
For samples that don't implement that, you must expose the back end server using something like Ngrok
Updated 11 days ago
