GithubHelp home page GithubHelp logo

anandlall112 / trulioo-embedid-client Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bondo11/trulioo-embedid-client

0.0 0.0 0.0 342 KB

JavaScript library which streamlines integration with the Trulioo EmbedID Suite

Home Page: https://gateway-admin.trulioo.com

JavaScript 94.09% HTML 5.91%

trulioo-embedid-client's Introduction

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

trulioo-embedid-client's People

Contributors

mkotsollaris avatar shastakova-trulioo avatar manleen-bhatia avatar vikigreen avatar jasontsaitks avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.