All Collections
Installation
Advanced Installation
Single Sign-On (SSO) with the Feedback Portal
Single Sign-On (SSO) with the Feedback Portal
Jon avatar
Written by Jon
Updated over a week ago

Single Sign-On (SSO) is a way to provide a seamless experience for your users when they access different systems or applications that require authentication. With the Userback Feedback Portal, you can implement SSO using JSON Web Tokens (JWT) to authenticate your users and keep them logged in when they access your Feedback portal.

To implement SSO with the Userback Feedback Portal, just generate an SSO token using the private key provided in your Portal Settings and then redirect your users from your app or website to the feedback portal with the SSO token included.

Steps to enable SSO with the Feedback Portal:

This guide is aimed at advanced users or teams with developers. We'll walk you through the process step-by-step, if you need help just reach out to our helpful support team.

  1. Access Userback Portal Settings and Copy the Private Key

    First, navigate to your Portal Settings and locate the Single Sign-On (SSO) section. From there, copy your private key (keep this one a secret).

    Single Sign-on
  2. Generate SSO Token with JWT Library

    Use a JWT library on your server side to generate an SSO token using the private key you copied in step 1. The SSO token contains the user's email, name, and avatar URL. Additional user information can be added. Here's an example using Node.js:

    const jwt = require('jsonwebtoken');// Replace YOUR_PRIVATE_SSO_KEY with your actual private keyconst private_key = 'YOUR_PRIVATE_SSO_KEY';// Replace the placeholder values with actual user informationconst sso_token = jwt.sign({  email: 'user@example.com',  name: 'John Doe',  avatar_url: 'https://www.example.com/avatar.jpg'}, private_key, {  algorithm: 'HS256'});
  3. Add SSO Token and Redirect Users to the Feedback Portal URL

    Add the SSO token generated in step 2 to your feedback portal URL, and redirect your users to the URL with the SSO token included. This will automatically log them in using SSO. Here's an example using JavaScript:

    // construct the URL for the feedback portal with the SSO tokenconst portal_url = 'https://mycompany.ideas.userback.io/p/nMeOGChr32?sso_jwt=' + sso_token;// redirect the user to the feedback portalwindow.location.href = portal_url;
  4. Optional: Hide the Feedback Portal from Anonymous Users

    Configure your portal settings to require SSO authentication if you want to hide the feedback portal from anonymous users and only allow users authenticated by SSO to access it.

Once you've completed the steps above, make sure to verify and test the SSO implementation before directing your users to the Feedback Portal. If you have any questions or need assistance, our friendly support team is always ready to help.

Frequently Asked Questions

Q: What is SSO?

A: Single Sign-On (SSO) is a way to provide a seamless experience for your users when they access different systems or applications that require authentication.

Q: What is a JSON Web Token (JWT)?

A: JSON Web Tokens (JWT) is a standard for securely transmitting information between parties as a JSON object. Read More about JWT and how it works here.

Q: Can I hide the feedback portal from anonymous users and only allow users authenticated by SSO to access it?

A: Yes, you can hide the feedback portal from anonymous users and only allow users authenticated by SSO to access it. How to Hide Your Feedback Portal from Anonymous Users Using SSO.

Q: Are feedback portal profiles the same as Userback user accounts?

A: No, feedback portal profiles are not the same as Userback user accounts. The portal profiles are created and managed separately from Userback user accounts.

Available on Company and Premium Plans

Did this answer your question?