Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
v1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

trulioo-embedid-client

Github

To include this package via CDN, use this line of code:

<script type="text/javascript" src="https://js.trulioo.com/latest/main.js"></script>

JavaScript library which streamlines integration with Trulioo.

How to use

Exposes TruliooClient to load EmbedID.

This SDK works in conjunction with the Trulioo EmbedId Middleware.

Instantiate EmbedID through the TruliooClient constructor:

function handleResponse(e) {
    console.log('@handleResponse', e);
}
const publicKey = 'PUT_YOUR_PUBLIC_KEY_HERE'; // Public Key
new TruliooClient({
    publicKey,
    handleResponse
});

Have a look at the example.html file.

Optional parameters

An example of using the optional parameters is in the example.html file.

End of Initialization event callback

You can optionally define a function called onInitialRenderComplete and pass it to the TruliooClient.

onInitialRenderComplete will be called when initialization has been completed.

Localization

TruliooClient supports taking two optional arguments for localization: the locale and defaultLocale parameters. These parameters can be used to render the app in a language other than english.

Enabling localization

Localization will be enabled if any of these arguments are passed in with non-empty values. Otherwise, 'en-US' will be used.

When localization is not enabled, the end user's browser locale is never considered.

Order of language resolution

When multiple options are available, the language being used will be chosen in the following order:

  • If a supported locale is passed to TruliooClient, it will be used.
  • If the locale is not passed or not supported, the end user's browser locale will be used
  • If the above options are not supported, the value of defaultLocale passed to TruliooClient will be used
  • If none of the above options are supported, en-US will be used

Expected format for Locale code

Only language and optionally region values are expected. Capitalization and subregions are ignored. Underscore and hyphens are considered interchangable. For example, 'en', 'en-US' and 'en_us' are ok.

See documentation for a list of supported languages and their associated locale codes.

Pull Request

Must update the main.js prior pull request to master

npm run webpack-release

About

JavaScript library which streamlines integration with the Trulioo EmbedID Suite

Resources

Stars

Watchers

Forks

Packages

No packages published