πSingle Sign On (SSO) Setup
Auto-login users into the community hub iframe hosted on your website for a friction-less user experience
Overview
Sesame supports Single-Sign-On as a way of auto-logging in users on the community hub iframe hosted on your website. At a high level, it works as follows:
The host website (your website) passing in the user's auth-token to the iframe as a url param in the src attribute.
The sesame server uses this auth-token to make a server-to-server API call to your server endpoint (which needs to be pre-configured in Sesame's settings tab).
This endpoint on your side verifies that the auth token is valid and if so returns back basic user info, which is used by the Sesame to create the user profile and auto-login the user
Here are the steps that need to be followed by you to set things up:
1/ Configure the User Profile URL on the Sesame Settings page
There needs to be an endpoint hosted on your servers that is used to authorize the user and return back basic profile information. This endpoint will be interacted with directly from Sesame servers. Set this URL in the Single Sign On (SSO) section in your Sesame Admin Portal.
Customer's User profile endpoint to complete SSO
GET
https://www.yourdomain.com/<whatever-path>
Sesame Server will make a call to this endpoint and pass in authToken which will be used to return back basic profile info about the user. This endpoint needs to be set in Sesame's settings.
Query Parameters
authToken*
String
User's authToken generated generated by customer website and passed to iframe
2/ Add Sesame Community Hub (consumer facing) as an iFrame on your custom domain
Follow the instructions in Custom domain to iFrame the Sesame Community hub into your own website.
To get SSO to work, you just need to make 2 more changes:
Update the src attribute on your iframe to add additionak url param of
sso=true
Once the user logs into your website you need to pass the user's authToken to the iframe by appending it to the src attribute. This can be done with some code like this
3/ Leverage our Community hub APIs to send us user events and reward users with credits/xp
Once the integration is complete, you can leverage our Community Hub APIs to send events and reward users with credits/xp using the user ID of the user in your DB (externalId)
Last updated