Simple integration with SDK & JWT

Simple SSO integration using JWT the built-in identity management features of Monterosa / Interaction SDK

In this use-case, the Monterosa Experience is embedded into a page in your website or app that requires the user to be signed-in. If a non-signed-in user attempts to visit the page, they will be prompted to sign in before continuing. This means that all users accessing the embedded Experience will have a JWT token available to pass to the Monterosa / Interaction SDK.

Note, this guide assumes the SDK is already in use in your systems, if it isn’t please follow the instructions you’ll find here, or contact Sales or your Account Manager if you need any further guidance.

Monterosa / Interaction SDK offers a standardised approach to this integration, reducing the effort involved on your side to a two step process:

  1. Sign in your user in order to obtain the JWT token

  2. Provide to the SDK the JWT token

Make sure that the JWT includes a key id (kid) in its header so that we know which key to use from your JWKS.

The SDK allows you to set the JWT token via a call to the setCredentials method:

let identify = Identify.default
let credentials = UserCredentials(token: "...")
identify.setCredentials(credentials: credentials)

You can then follow the instructions to embed the Experience into your page using the SDK as described here.

See also our SSO Integration guidelines for more general information on this integration