Orba One
Search…
JavaScript
This document explains how to integrate the Authentication flow from your web application

Orba One

To integrate the Orba One SDK, follow this guide and use your own API Key which you can obtain from the developer dashboard.
The integration of the Orba One Web SDK follows these simple steps:
    1.
    Install the SDK through NPM / Yarn
    2.
    Get an API Key
    3.
    Render the Orba One verification button and handle the result
Additionally, there is a non-package manager installation option. You can start using the Orba One SDK library directly by including it in your HTML file. Instructions can be found below.

1. Install the SDK

1
# Yarn
2
yarn add @orbaone/core
3
4
# NPM
5
npm install --save @orbaone/core
Copied!

2. Get an API Key

Orba One uses API keys to allow access to the API and show onboarded users in your dashboard. Login to your Orba One account and create a new Orba One API key here: Developer Dashboard.

3. Render the verification button

Import the Orba One SDK
1
import { renderButton } from "@orbaone/core";
Copied!

Example Usage

1
renderButton({
2
apiKey: "exampleAPIKey",
3
applicantId: "0000-0000-0000-0000",
4
target: "#button",
5
disableStyle: false,
6
onSuccess: (data) => {console.log(data)},
7
onCancelled: (data) => {console.log(data)},
8
onError: (err) => {console.log(err)},
9
steps: ['welcome'],
10
})
Copied!

renderButton(config) Options

Parameter
Type
Description
target
string or DOMElement
The DOM element you want to mount the button on.
apiKey
string
The OrbaOne Key you obtained from the dashboard.
applicantId
string
The ID of the applicant that you want to onboard.
disableStyle
boolean (optional)
The OrbaOne Key you obtained from the dashboard.
onSuccess
function
Callback function after onboarding is complete.
onError
function
Callback function if onboarding has failed.
steps
array
Array of verification steps.

Browser

Orba One is available over unpkg CDN
1
<script type="text/javascript" defer="true" src="https://unpkg.com/@orbaone/[email protected]/lib/index.umd.js" />
Copied!

Example Usage

1
<script type="text/javascript">
2
OrbaOne.renderButton({
3
apiKey: "exampleAPIKey",
4
applicantId: "0000-0000-0000-0000",
5
target: "#button",
6
disableStyle: false,
7
onSuccess: (data) => {
8
console.log(data);
9
},
10
onError: (err) => {
11
console.log(err);
12
},
13
onCancelled: (state) => {
14
console.log(state);
15
},
16
steps: ["welcome"],
17
});
18
</script>
Copied!
Last modified 6mo ago