Set Up Your Project
Setting up your project entails adding the code used to load and configure the BindID SDK, as described below.
STEP 1: Load the SDK
Load the BindID SDK using the following URL based on the environment:
Sandbox:
https://signin.bindid-sandbox.io/bindid-sdk/transmit-bind-id-sdk.jsProduction:
https://signin.identity.security/bindid-sdk/transmit-bind-id-sdk.js
Typically, this is done by adding the following script tags to your page, where the first script tag is used to support polyfilling for IE browsers and the second is used to load the SDK:
where <sdk-url>
is the URL provided above.
STEP 2: Configure the SDK
The BindID SDK can be initialized and configured in two ways—either using meta tags or programatically.
Using Meta Tags
To configure the SDK using tags:
Add the following set of meta tags before the script tag used to load the SDK:
Meta Name | Description |
---|---|
xm-bind-id-client_id | Client identifier issued to the client via the BindID Admin Portal. Equivalent to the clientId parameter of the initialize() SDK call. |
xm-bind-id-api_compat | Optional. API compatibility level. Options are: latest —most updated API level, and api-level-1 —first API level. Equivalent to the apiCompat parameter of the initialize() SDK call. |
xm-bind-id-disable_state_validation | Optional. Whether or not the processRedirectResponse() method should validate the last state sent with the last authenticate() call. Options are: true —state is not validated, and false —(default) state is validated. Equivalent to the disableStateValidation parameter of the initialize() SDK call. |
For example:
Using SDK Calls
To configure the SDK programatically:
Invoke the initialize()
SDK method (see the API reference).
Here's an example of invoking the initialize()
SDK method: