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 SampleGuide / TutorialCode Sample Repository
Vanilla JavascriptHow-to use Web SDKonboarding-core-javascript
React JS (Clean)onboarding-core-react
Next.jsNextJs Integration Guideonboarding-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 SampleGuide / TutorialCode Sample Repository
Extended Onboarding Example in React using TypescriptGuideonboarding-extended-react
Extended Onboarding Example in Vanilla Javascriptonboarding-extended-javascript

Web Authentication Example

Code SampleGuide / TutorialCode Sample Repository
Vanilla JS Web AuthenticationFace Authenticationauthentication-javascript

Low-Code Integration Examples

Code SampleGuide / TutorialCode Sample Repository
Redirect and BackRedirect and Backonboarding-lowcode-redirect
Embedded IframeEmbedded Iframeonboarding-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.

Backend Server in NodeJS

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