Use secure key to generate SSO token

Use secure key to generate SSO token

Single sign-on (SSO) is a technique used to authenticate users across multiple applications or systems. A single sign-on token is a way to enable this process. It allows users to log in to multiple applications or systems with a single set of credentials, eliminating the need to remember and manage multiple usernames and passwords.

Usage

To enable SSO, you’ll first need to generate a JSON web token on your server.

  1. Go to SSO page

  2. Copy your Secure key

  3. Generate a JSON web token

  4. In the widget code, replace sso_key_here by your SSO token that is generated from the Step 3

<script>
  (function (d, o, r, a, n) { 
    o.$doran = o.$doran || {}; o.$doran.widgets = o.$doran.widgets || [];
    o.$doran.widgets.push({ widget: 'WebDJL9bAcxkX1PkCBk0', sso: "sso_key_here" });
    var js, e = d.getElementsByTagName(r)[0];if (d.getElementById(a)) return;
    js = d.createElement(r); js.id = a; js.src = n; js.async = !0;
    e.parentNode.insertBefore(js, e); 
  })(document, window, 'script', 'doran-jssdk', 'https://sdk.doran.app/sdk.js')
</script>

NodeJS

const jwt = require('jsonwebtoken')

const sso_key_here = jwt.sign({ email: user.email }, 'secure_key');
Linda Bui
Linda Bui
Updated a week ago 1 min read

Table of contents