Quick Start
Creating the Application
The API requests and the JavaScript SDK require a client ID and for some features a client secret, to obtain those you need to create an application using the Vulos Identity dashboard.
You can do that by clicking on the "New Application" link in the left navigation bar and by filling in some details.
In the "Redirect URLs" field you need to specify the link of the callback URL that we will define later on, for now set it to http://localhost:8080/callback or http://localhost:8080/index.html if you want to implement the browser application flow.
And you need to add the openid scope, for more detailed information about the scopes, take a look at the Scopes and Claims.
Install the library
The best way to interact with our API is to use one of our official libraries:
npm install @vulos/identity-node-sdk --savenpm install @vulos/identity-browser-sdk --save Add the following script tag to the HTML where you'll integrate Vulos Identity:
<script src="https://cdn.vulos.io/latest/identity.min.js"></script>The Frontend Auth Package is exposed as VulosIdentity.Auth and The Base Package is exposed as VulosIdentity.Base in the global scope.
Setting up the OpenID flow
You need to create an application object that matches the application you just created in the dashboard.
import { Application, User } from "@vulos/identity-base"
const application = new Application({
id: "<paste your_client id here>",
// if you made a browser application remove this property
secret: "<paste your client secret here>",
scope: "openid",
redirectUrls: ["<your website's callback URL>"]
})const { Application, User } = VulosIdentity.Base
const application = new Application({
id: "<paste your_client id here>",
// if you made a browser application remove this property
secret: "<paste your client secret here>",
scope: "openid",
redirectUrls: ["<your website's callback URL>"]
})Then you need to create a route for the callback URL (in this example we are going to assume that you use express) and a route that redirects the user to the login / consent screen:
Then you can create some code that uses local storage for state that authenticates the user and processes the callback parameters:
The index.html file for this example should contain the code:
Then you can create some code that uses local storage for state that authenticates the user and processes the callback parameters:
Then you can add the following code to index.html:
Further reading
After you have a basic app up and running, you can add functionality based on your requirements by adding more scopes and accessing more of the API.
For information about some concepts used in Vulos Identity we suggest reading:
OrganizationsScopes and ClaimsFor documentation about the JavaScript SDK we suggest reading:
Identity JavaScript SDKLast updated