# Set Up SSO for an impact.com Microsite via JWT

Your Advocate program's microsite typically requires your customer advocates to sign up with a username and password before they can access their share links and reward details. However, as an advanced alternative, you can instead authenticate users by generating a [JSON Web Token (JWT)](https://en.wikipedia.org/wiki/JSON_Web_Token) server-side and passing it to the microsite via a URL parameter.

Using this method, participants will not have login credentials for the microsite. Instead, they gain access by logging into your existing customer portal, which then redirects them to the microsite using the JWT to identify them and display their personalized content.

#### Before you begin

{% hint style="warning" %}
**Important:** This is an advanced implementation that bypasses the standard Managed Identity Service for the microsite and requires support from your developer team to set up.
{% endhint %}

You should only use this method if all of the following apply:

* You want to simulate a single sign-on (SSO) experience by automatically logging participants into your program's microsite.
* You can generate JWTs server-side.
* You can't or don't want to install the [Universal Tracking Tag (UTT)](https://help.impact.com/brand/what-would-you-like-to-learn-about/platform-features/tracking/javascript-tag-tracking/tracking-with-universal-tracking-tag-utt) onto your site.

{% stepper %}
{% step %}

### Step 1: Create a microsite without managed identity

When you create your microsite, you'll need to turn off the Managed Identity Service, then set all your pages to be accessible to "unverified" users. The *Dashboard* page will use the JWT to authenticate the user and load the microsite.

<details>

<summary>Create the microsite</summary>

First, adjust the settings to turn off the *Participant Login* option.

1. From the left navigation menu, select ![](https://4048883401-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fh35M3mMIl7XP42pqh7Ls%2Fimage.png?alt=media\&token=bf6b6ba2-295c-4cdb-8c77-f171416c13e1) **\[Engage]** **→ Content**.
2. On the *Microsite* card, select **Edit Settings**.
3. You'll then be redirected to your new *Microsite Settings* page.
4. Within the *Login* section, ![](https://4048883401-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-2c3a3c392d640f7b79d44c16f21c2c4f0ec3dcca%2F80381ca112cfb2757e97b8669cc0b5c98c8ce8d60ed9e3048b4a86a52e76719f.svg?alt=media) **\[Toggle off]** **Participant Login**.
5. Select **Save Settings**.

</details>

<details>

<summary>Configure the Dashboard page</summary>

Next, configure your microsite's *Dashboard* page to be visible to unverified users. Then, connect the components on the page with your referral program so the right information appears.

1. Adjust your site's *Dashboard* page settings.
   * From the left navigation menu, select ![](https://4048883401-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2F8AYI7cAhXQWYRoQlKHte%2Fimage.png?alt=media\&token=d2b5a01e-c7b4-4a71-a6a0-0cea5a4b7ac4) **\[Engage]** **→ Content** → **Setup Content** or **Edit Content**.
   * From the *Microsite* tab, select **Dashboard** in the *Logged In Layout* section.
   * Select ![](https://4048883401-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-c746d936c908b9090325464502f7c10acda0e993%2F2a92939e8e78dd7e0c0416b1a250d5ef1d7ab0dec966fb5ed320ca62acfc06c5.svg?alt=media) **\[Menu] → Settings**.
   * From the *Allowed users* drop-down list, select **Unverified**.
2. Add your program ID to the components on the *Dashboard*.
   * User Stats — You must add the ID to each individual user stat you choose to display.
   * Share Link
   * Referral code
   * Social media buttons — You must add the ID to each individual social media share button you choose to include.
3. At the top-right corner, select **Save**.

   <div data-with-frame="true"><figure><img src="https://4048883401-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-7314ab2d13689a218d7b2ab0ff0ae784aecc169d%2Fe489a23c2242c41439531bebcaa74a7caac8de79b22b4e423c11194933156962.jpg?alt=media" alt=""><figcaption></figcaption></figure></div>

For help with using the editor to find and adjust your page and component settings, refer to [Microsite Editor Explained](https://help.impact.com/brand/what-would-you-like-to-learn-about/advocate-program/manage-advocate-participant-experiences/microsite-experiences/microsite-editor-explained) and [Customize Microsite Layouts & Pages](https://help.impact.com/brand/what-would-you-like-to-learn-about/advocate-program/manage-advocate-participant-experiences/microsite-experiences/customize-microsite-layouts-and-pages).

</details>

<details>

<summary>Remove unnecessary pages</summary>

Remove the layout and pages that your microsite won't use.

1. Hover your cursor over the page or layout.
2. Select ![](https://4048883401-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-8ec3e877b1397045c61d394485e72ac4d93120ee%2Fc6ddb46c637059f06e86c790a911217a9428f5c47b5efef046f90555e85b03cd.svg?alt=media) **\[More]** **→ Delete**.
3. Remove the *Logged In Layout*.
4. Remove the following pages:
   * Edit Profile
   * Email Verification
   * Forgot Password
   * Login
   * Logout
   * Register
   * Reset Password
   * Verify Email

</details>
{% endstep %}

{% step %}

### Step 2: Generate the JWT

The JWT structure follows standard Advocate requirements for user authentication. If you've integrated Advocate before, you're likely already generating similar tokens for UTT.

You must generate the JWT securely on your server or any trusted backend system—never in the browser.

Learn how to [generate a JWT and the payload requirements](https://integrations.impact.com/impact-brand/docs/json-web-tokens).
{% endstep %}

{% step %}

### Step 3: Append the JWT to the microsite URL

Once the user is logged into your platform, redirect them to the microsite with the JWT included in the URL query string.

{% hint style="info" %}
**Example:** `https://your-microsite.squatch.app/?jwt=<YOUR_GENERATED_JWT>`
{% endhint %}

You can either open the microsite in a new browser tab, or embed the microsite in your app using an iframe. If you decide to embed the microsite, make sure you handle [cross-origin resource sharing (CORS)](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) and browser restrictions appropriately.
{% endstep %}
{% endstepper %}

#### Notes

* If you use this authentication method, users won't have login credentials for the microsite.
* JWT-based access must be tightly controlled. Don't expose or manipulate it in client-side JavaScript.
* This is a non-standard approach — test it thoroughly in your staging environment before rolling out your program.
* If you need [support](mailto:saasquatch-support@impact.com), include your microsite URL, implementation details, and a sample JWT payload in your support request.
