The Paragon SDK can be imported in your front-end JavaScript to embed the Connect Portal and trigger workflows in your application.
.configureGlobal
function to point the SDK to use the base hostname of your Paragon instance.
Migrating from the <script> tag?
paragon
is no longer exposed as a global or on the window
object by default.Any references to paragon
or window.paragon
must be updated to point to the package import:sub
, iat
, and exp
claims:
paragon.authenticate
in your view with a JWT signed by your backend using the library chosen in Step 2. This JWT is the Paragon User Token.
How do I find my Project ID?
paragon.authenticate
function is Promiseable and resolves when the SDK has successfully authenticated your user. Note that other functions, like paragon.connect
, may not work as expected until this Promise has resolved.
Example Implementation: A Node.js and Express app using Handlebars view templating
paragonJwt
set in context within the view template, with a call to paragon.authenticate
:
.auth0.com
. Example: https://<YOUR_TENANT>.auth0.com
.If you have a domain alias for your tenant domain, use the domain alias instead.