Manual Reference Source Test

NBC Identity SDK

Identity Versions

Usage

Basic usage looks like this:

<script src="https://id.nbc.com/sdk/v7.3.0/identity.min.js"></script>
<script>
  Identity.initialize('example').then(({state, user}) => {
    console.log('Initialized', state);
    if (state === 'authenticated') {
      console.log('Authenticated', user);
    } else {
      Identity.authenticate();
    }
  }).catch((error) => {
    window.alert(`${error.name} initializing Identity: ${error.message}`);
  });
</script>

In the example above the latest version number is included in the script path and example is the App key.

Please use try to keep up-to-date with the latest version at all times.

And make sure that you are using the correct key and that it's config file has been uploaded to the correct location, e.g: https://id.nbc.com/sdk/config/example.json

Identity Methods

A full list of usable SDK methods can be found here: https://id.nbc.com/sdk/docs/class/src/modules/identity.js~Identity.html#instance-method-authenticate

The above are not yet available, so for now please use:

Assets

App specific assets can be uploaded to https://id.nbc.com/sdk/assets/example/ or self-hosted.

Example

For a more complete usage example please take a look at the following example application:

https://id.nbc.com/sdk/example/

The above is not yet available, so for now please use:

Changelog

The Changelog can be found in the Manual section.

Reference

A complete list of all classes, variables and functions can be found on the left.