Advice and Answers from Hellonext

Enabling SSO

Instructions on how to generate Single Sign-On tokens on your server and embed a bucket with SSO.

Embed a Bucket with SSO

We support single sign on (SSO) to easily identify your users on Hellonext. With this feature enabled, your users can submit feedback without having to login (we will override it with your authentication system).

This feature is currently supported on bucket embeds only.

How does it work?

  • You generate a SSO Key in Settings -> Advanced Settings -> SSO. Don’t share this key with anyone.
  • Sign a JWT Token with the generated SSO Key in your server.
  • Use the JWT token to identify and authenticate your user on Hellonext.
  • Now, your users can seamlessly submit feedback and interact.

Generate SSO Token

Go to Settings → Advanced Settings → SSO and click on Generate if not already generated.

Generate JWT on your server

npm install --save jsonwebtoken

var jwt = require("jsonwebtoken");

const SSO_KEY = "GENERATED_SSO_KEY";

function generateJWTToken(user) {
  var userData = {
    email: user.email,
    name: user.name,
  };
  return jwt.sign(userData, SSO_KEY, { algorithm: "HS256" });
}

Embed with SSO Token

<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Feedback</title>
  </head>
  <body>
    <div data-hellonext></div>
    <script src="https://app.hellonext.co/embed.js"></script>
    <script>
      hellonext.init({
        embedURL: "EMBED_URL_FOR_BUCKET",
        ssoToken: "GENERATED_JWT_TOKEN",
      });
    </script>
  </body>
</html>
  • Get the embedURL link from Buckets → Options (of any bucket) -> Embed Bucket. Example: https://acme.hellonext.co/embed/b/feedback.
  • ssoToken is what we generated in the generateJWTToken above.

Hellonext can now identify your users and authenticate them automatically. 🎉

Note: SSO is a PRO feature. Contact us if you need anything with it. 🙌🏻