How can we help you?

Setting up Single Sign-on for your Hellonext account

Swathy R
August 24, 2023

Automatically know which user is giving you feedback via your Hellonext account with Single Sign-On (SSO). SSO allows you to connect your user authentication system directly with that of Hellonext’s to know exactly who is giving you feedback or supporting an existing one.

With SSO, you can understand whether the customer is a paying customer, a VIP, or someone random. Want to know more about SSO? Read the Wikipedia article here ↗

This article contains:

  1. Pre-requisites for SSO setup

  2. Implementation Ideas

  3. Generating an SSO token on Hellonext

  4. How to generate JWT on your server

  5. How to embed with SSO Token

  6. How to setup authentication redirects

Once you integrate Hellonext’s SSO, your users can submit feedback without logging in (we will override it with your authentication system). Before you can use the SSO feature for feature requests, there are a couple of pre-requisites you might want to know:

Pre-requisites for SSO setup

  • Your application/product has a user authentication system already;

  • Your application/product can generate SSO tokens;

  • You must be the administrator of your Hellonext account.

Implementation Ideas

We now support SSO redirects using your users can be authenticated to your feedback page without having to create a Hellonext account.

  • Adding to this SSO is also supported on Board embeds and widgets you have integrated on your webpage. Read more→

    Note: SSO is a feature available on our Fly High plan or above.

Generating an SSO token on Hellonext

Generating SSO token on Hellonext is quite simple.

  • Sign in to your Hellonext account.

  • Go to your Admin Dashboard by clicking the Dashboard button next to your profile picture on the top right corner.

  • Click on Organization Settings → Advanced. You will find the SSO section, where my team has written some instructions to generate the key.

  • Just click on Generate, and you should have your shiny new SSO token for you to use.

  • Sign a JWT Token with the generated SSO Key on your server/application.

  • Use the JWT token to identify and authenticate your user on Hellonext.

That’s it. Your users can now seamlessly submit feedback to your account, and you also know who they are.

How to 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" }); 
}

If you have a private organization and would like to add managers to your team automatically, set the add_to_team key to true in userData.

var userData = { 
  email: user.email, 
  name: user.name, 
  add_to_team: true 
};

Alternatively, if you'd like to add them as a customer, set the add_as_customer to true.

var userData = { 
  email: user.email, 
  name: user.name, 
  add_as_customer: true 
};

Passing additional fields to the user profile

You can also pass us label, avatar and custom attributes which will be added to the user upon successful login.

  1. If the label you've sent us is not already created on your Admin Dashboard, we will create one for you. Ensure that you send us the properly spelled label information.

var userData = { 
  email: user.email, 
  name: user.name, 
  labels: ["Pro", "EU"] 
};
  1. You can send us an image URL which can be added as the user's avatar.

var userData = { 
  email: user.email, 
  name: user.name, 
  avatar: "https://example.com/avatar.png" 
};
  1. You can also pass custom attributes which will be added to your customer record on Hellonext dashboard

var userData = { 
  email: user.email, 
  name: user.name, 
  custom_fields: {
          "City": "Chennai",
          "Favorite Food": "French Fries"
        }
};

How to embed with SSO Token?

https://acme.hellonext.co/embed/b/feedback/?sso_token=[SSO_TOKEN]
  • Get the embedURL link from Boards → Click on a Board → Options → Embed Board. 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. 🎉

How to setup authentication redirects

With SSO redirects if you have an authentication page on your website you can now send a request to your server to generate a single sign-on token and redirect your users back to Hellonext.

Here's our detailed help article for more information on this!

If you need further help, feel free to reach out to us. We are happy to help!😊.