Product workflows2026-11-083 min read

Configure Canny Widget Single Sign-On

Generate an HS256 JWT on your server from the authenticated user and pass it to the Canny widget. Widget SSO is distinct from workforce Okta or Entra integrations.

Before you start: Have a backend session, Canny’s private SSO key and an installed widget. Install jsonwebtoken on the server and keep the private key out of browser code.

Worked example: When an already signed-in PM opens feedback, your server issues a short-lived token for that PM’s stable user ID. The client must not choose someone else’s ID or email.

Step-by-step guide

01

Find the private key

Use Canny’s SSO key settings and store the value in a server environment variable. Do not copy it into the frontend build configuration.

02

Install the server library

Install jsonwebtoken in the backend package. Wire token generation to an endpoint that requires your existing authenticated session.

03

Sign the trusted identity

Use the server-resolved user, as in the example. The function expects the caller to provide an authenticated user; it is not a public endpoint by itself.

const jwt = require('jsonwebtoken');

function createCannyToken(authenticatedUser) {
  const key = process.env.CANNY_SSO_KEY;
  if (!key) throw new Error('CANNY_SSO_KEY is required');
  return jwt.sign({
    id: String(authenticatedUser.id),
    email: authenticatedUser.email,
    name: authenticatedUser.name
  }, key, { algorithm: 'HS256', expiresIn: '5m' });
}
04

Pass the token to the widget

Expose an authenticated /api/canny/sso handler that returns {ssoToken: createCannyToken(sessionUser)}. After installing the official SDK bootstrap and container, render with the returned token as shown. Configure your router so /feedback/* reaches this page and set the board Widget URL accordingly.

<div data-canny></div>
<script type="module">
  const response = await fetch('/api/canny/sso', {
    credentials: 'same-origin'
  });
  if (!response.ok) throw new Error('Canny authentication failed');
  const { ssoToken } = await response.json();
  if (!ssoToken) throw new Error('Missing SSO token');
  Canny('render', {
    boardToken: 'YOUR_BOARD_TOKEN',
    basePath: '/feedback',
    ssoToken,
    theme: 'light'
  });
</script>
05

Verify success and failure

Use Canny’s token validation tool with a sample identity, then test the real widget. Check expired-token handling and the logged-out state before broad rollout.

Common mistakes

Signing arbitrary browser input

Derive identity from the backend session. A public token endpoint accepting user IDs from a request can impersonate users.

Confusing widget SSO with workforce SSO

The JWT flow authenticates product users in the widget. Identity-provider integration is a separate configuration.

Sources and verification

Based on product documentation checked on 2026-11-04. This is a documentation-based guide, not a hands-on benchmark. Features and availability can change.

Frequently asked questions

Spend less time on setup, more on decisions

Vantage connects your tools and generates specs grounded in real data. Free to start.

Try it free, no sign-up

Before you set this up, check what customers are actually asking for.

Paste call notes, support tickets or feedback. Vantage pulls out the signals and themes in about 30 seconds.

Free to start. No credit card required.

Related reading