Angular JS SDK
The Identity Hub has a SDK for Angular JS.
Download
Download the SDK source from here
Configuration
Installation
Use bower to install the sdk in your project.
Bower
bower install theidentityhub-angular
Configure your app
angular.module('app', ['identityHub'])
.config(function (identityServiceProvider) {
identityServiceProvider.config({
baseUrl: "https://www.theidentityhub.com/{tenant}",
clientId: "[YOUR_CLIENT_ID]",
redirectUri: "[YOUR_REDIRECT_PAGE]",
popup: false
});
});
Using this configuration the user will be redirected to The Identity Hub to authenticate. After the user is authenticated The Identity Hub will redirect back to your app.
After sign-in you can use the identityService.principal object to get info on the current user.