Example Web SDK Integration

Django Implementation of HumanID SSO

Developer Console

Acquire CLIENT-ID, CLIENT-SECRET, and set-up redirect URLs on the App Details page by registering your app through

WebLoginUrl API Call

Create a view function that will perform a POST API request and render HTML:
def homepage(request):
headers = {'client-id':'CLIENT_ID','client-secret':'CLIENT_SECRET'}'',headers=headers)
return render(request,'trial/homepage.html',
Create a HTML page:
{%block content%}
<p><a href={{}}>{% include 'anonymous-login.svg.html'%}</a></p>

Callback URL

After a user successfully logs in through humanID. The user will be redirected to the URL specified in the developer console on the App Details page.
Create a function that will take the exchange token in that URL and make another API request to acquire a unique User ID.
def callback(request):
headers = {'client-id':'CLIENT_ID','client-secret':'CLIENT_SECRET'}
token = request.GET.get('et')
response='',headers= headers,data={'exchangeToken':token})
return render(request,'trial/callback.html',