GBG Developers

Guides   |   Add SDK to Project

Add SDK to Project

Once GBG has been contacted and you have been set up with an Identity Solution account and received a link to the SDK, you can add it to your project by including the following line if you’re using JavaScript:

<script type="text/javascript" src="dist/sdk/idaas.gbg.js?11223344" charset="UTF-8"></script>


The line above assumes that the file hierarchy looks as shown below. An example JavaScript project is available on GitHub.

With TypeScript you can use WebPack to manage building the project. There is a skeleton set of files for a TypeScript project on GitHub to demonstrate building TypeScript applications with WebPack using Microsoft Visual Studio. Download it and place it on your computer such that your example demo folder looks like this:



Next, from a command window (for instance Windows PowerShell) go the folder and type npm install


Examine the src folder index.tsx file. To import the SDK you can use:

import * as IDaaS from '../sdk/idaas.gbg';

The next step is to obtain an IDP access token, and then exchange that for a GBG access token.