Authentication
The authentication process describe how to add a link to your website to Securitize D and how to retrieve the information provided after the login process and use it on Connect API

Requisites

Before you can interact with Securitize iD APIs, request from Customer Success team the following information:
    issuerID or DomainID: this is the ID which identifies your unique Domain.
    OAuthsecret: this is the OAuth secret.
    Base URL: where to connect to Securitize iD (Sandbox or Production environments).
You will have to provide a redirectURL to a server where your logic is running. This URL has to be whitelisted by Securite. You can find more information of how to perform the process here.
In order to integrate Securitize iD as an authentication procedure, you will just have to add a Log in with Securitize iD button to your log in/registration page. That button will provide a link to initiate the OAuth process so the user can login and carry out the verification steps.
Securitize iD Log in button

The initial flow

Initiating the OAuth process

To initiate the authentication process simply redirect the user to:
URL
1
https://id.securitize.io/#/authorize?issuerId=[CLIENT_ID]&scope=[SCOPE]&redirecturl=[REDIRECT_URL]
Copied!
Parameter
Description
CLIENT_ID
Your application client id provided by Securitize
SCOPE
Scope of data access (we currently only support info details verification)
REDIRECT_URL
The url to redirect after investor signs the data share agreement. MUST be list in redirectUrls array.

Example:

URL Call
HTML
JavaScript
1
https://id.securitize.io/#/authorize?issuerId=123e4567-e89b&scope=info%20details%20verification&redirecturl=https://dashboard.securitize.io/authorization
Copied!
1
<body>
2
<div id="SecuritizeID">
3
</div>
4
</body>
Copied!
1
function showSecuritizeIDLogInLogo() {
2
var baseUrl = "STRING";
3
var issuerID = "STRING";
4
var scope = "info details verification";
5
var redirecturl = "URL"
6
7
var securitizeID = document.getElementById("SecuritizeID");
8
var link = document.createElement("a");
9
var logo = document.createElement("img");
10
11
var href = baseUrl + "#/authorize" + "?issuerId="
12
+ issuerID + "&scope=" + scope + "&redirecturl=" + redirecturl;
13
logo.src = "./images/securitizeID.png";
14
link.href = href;
15
link.appendChild(logo);
16
securitizeID.appendChild(link);
17
}
Copied!

Working with OAuth response

If the process was successful we will return the following data added to your redirect url
1
https://REDICT_URL?code=40cba031-8fd2-4a88-89ff-36e07e5e060b&country=US&authorized=true
Copied!
Parameter
Description
code
Authorisation code used to get the user access token. (Code will expire after 5 minutes)
country
Securitize iD Investor country
authorized
Returns true if investor was authorized on with your Application in the past. NOTE: does not return if its the first time investor is going through OAuth process with your application

Example:

This JavaScript snippet captures the query string of the redirected URL:
1
function captureTOKEN() {
2
const queryString = window.location.search;
3
const urlParams = new URLSearchParams(queryString);
4
const code = urlParams.get("code");
5
const country = urlParams.get("country");
6
const authorized = urlParams.get("authorized");
7
console.log(code, country, authorized);
8
if (authorized == "true") {
9
// User has signed-up and has a SecuritizeID
10
}
11
}
Copied!
Last modified 3mo ago