JavaScript (Version -2)

This cidaas Javascript SDK library is built on the top of OIDC client javascript library. The Example which explains integration of javascript SDK with client application needs to be improved and we are working on that.

The following things are to be kept in mind while integrate our cidaas sdk

Configuring App/Client:

When you are integrating your own Business App with cidaas, you may want to modularize the interactions and attributes. There are several information like Scope, Roles, Grant-Types, re-direct URLs etc., that you may want to group into one configuration/settings. This can be done by creating cidaas App or Client.


From CDN

<!-- Latest patch release -->
<script src=""></script>


<!-- Latest patch release -->
<script src=""></script>


After adding cidaas-sdk.js create a local file and name it like index.js.

var options = {
authority: 'your domain base url',
client_id: 'your app id',
redirect_uri: 'your redirect url',
post_logout_redirect_uri: 'your post logout redirect url',
popup_post_logout_redirect_uri: 'your post popup logout redirect url',
silent_redirect_uri: 'your silent redirect url',
response_type: 'id_token token',
scope: 'openid email roles profile',
mode: 'redirect'

Initialise the cidaas sdk using the options.

var cidaas = new CidaasSDK(options);


Browser Methods

The below methods will applicable for using cidaas hosted pages only.

Login With Browser

To login through cidaas sdk, call loginWithBrowser(). This will redirect you to the hosted login page.


once login successful, it will automatically redirects you to the redirect url whatever you mentioned in the options.

To complete the login process, call logincallback(). This will parses the access_token, id_token and whatever in hash in the redirect url.

cidaas.loginCallback().then(function(response) {
// your success code here
}).catch(function(ex) {
// your failure code here

Register With Browser

To register through cidaas sdk, call registerWithBrowser(). This will redirect you to the hosted registration page.


Getting UserInfo

To get the user profile information, call getUserInfo(). This will return the basic user profile details along with groups, roles and whatever scopes you mentioned in the options.

cidaas.getUserInfo().then(function (response) {
// your success code here
}).catch(function(ex) {
// your failure code here


cidaas.logout().then(function () {
// your success code here
}).catch(function(ex) {
// your failure code here

In logout method you need give redirect url, if not it will automatically redirect to login page

The cidaas sdk provides the following functionalities and features, which are very easy to integrate into your application!

The below methods will be applicable for only native support

**1. Login with credentials

  1. Login with social
  2. Passwordless login
  3. Forgot Password
  4. Consent Management
  5. De-duplication
  6. Multifactor Authentication (Email, SMS, IVR, TOTP, Pattern, SmartPush Notification, Touchid, Voice Recognition, Face Recognition)
  7. Reset Password
  8. Account Verification
  9. Getting Request_Id, Client info, Tenant info, User Info
  10. Get Access Token
  11. Get access token by refresh_token**

Please refer to our GitHub project to see details for the above listed features, and how to integrate, manage, authenticate & authorize using cidaas javascript sdk:

results matching ""

    No results matching ""