It's always important to know who is giving you feedback. When you redirect your users from your app to your feedback portal, you can keep your users automatically logged in using SSO.

Instructions:

Step 1: Get your private key ready

To find your private key, head to portal settings and scroll down to the "Single Sign-On" section.

Step 2: Generate an SSO token.

We use JSON Web Tokens (JWT) to securely authenticate your users. You will need a JWT library on your server-side to generate the token. The code example below shows how to generate an SSO token in Node.js.

const jwt = require('jsonwebtoken');
const private_key = 'YOUR_PRIVATE_SSO_KEY';

const sso_token = jwt.sign({
email: 'james@example.com',
name: 'James White',
avatar_url: 'https://www.example.com/avatar.jpg'
}, private_key, {algorithm: 'HS256'});

Step 3: Add the SSO token to your portal URL and redirect

Once you have the SSO token generated, add the token to your portal URL and redirect your users to the URL.

const portal_url =
'https://mycompany.ideas.userback.io/p/nMeOGChr32?sso_jwt=' + sso_token;

window.location.href = portal_url;
Did this answer your question?