Installation
To embed Supahub on your website, copy & paste the provided code snippet:Usage of Embed
To use embed in your website, add thedata-supahub-embed
attribute to a div element:
Single Sign-On with Embedding
The embed supports authenticating your users via SSO. Here’s what you need to do:- Log in to acquire your private key from SSO settings. Ensure that you store this key securely on your server and prevent unauthorized access.
- When a user visits the embed, send a request to your server to generate a JWT token.
- Generate a token on your server with customer data using the provided snippet.
- Pass the generated JWT token to the Supahub embed for authentication.
1
Install JWT packages
Install the required packages for JWT token generation on your server.
2
Generate the JWT token
Copy and use the “Private Key” from SSO settings to generate a JWT token on your server.
Private Key should be kept secure and not to be shared. Add it in your .env
file.
To enhance security measures, Single Sign-On (SSO) tokens are restricted from authenticating users with administrative privileges within any Supahub workspace. Instead, these users will need to log in using the dedicated portal at workspace.supahub.com
3
Pass the token back to your app and into our embed
The token will be used for user authentication.