> For the complete documentation index, see [llms.txt](https://help.meltingspot.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.meltingspot.io/english/manage-spot/sso.md).

# Single Sign-On

All it takes is a few lines of code added to your website!

Let your users access your Spot through your own authentication source, without creating a separate MeltingSpot account.

MeltingSpot offers **two SSO authentication modes**, each independently enabled from your Spot's settings (`Settings > Single Sign-On`):

* **Authorization URL SSO** ("Flow-based SSO" tab): the user clicks "Continue with SSO" and authenticates on your side. Two sign-in methods are available:
  * **Redirect to your website (JWT)**: MeltingSpot redirects the user to your login page, which then redirects them back to MeltingSpot with a signed token.
  * **OpenID Connect**: you connect your identity provider directly (Keycloak, Salesforce, Microsoft Entra, Google Workspace...). No development on your side, everything is done through configuration.
* **Programmatic SSO** ("Token-based SSO" tab): Your backend or our SDKs exchange a signed token directly for a session, with no browser redirection.

{% hint style="info" %}
The JWT method and the Programmatic mode rely on **the same JWT token** and **the same SSO secret key** ("Authenticate your users with the SSO key below" field, shown under the tabs of the settings page). Only the way this token is delivered to MeltingSpot differs.

With the OpenID Connect method, there is no token to generate: see [#mode-1-with-openid-connect-connect-your-identity-provider](#mode-1-with-openid-connect-connect-your-identity-provider "mention").
{% endhint %}

## **Generate an SSO token**

Whether you use the "Authorization URL" mode with the JWT method or the "Programmatic" mode, you need to generate a **JSON Web Token (JWT)** signed with **HS256** using your Spot's SSO secret key.

### **Install JWT library**

First, you'll have to install a library that allows you to create the token embedding your user's information.

{% tabs %}
{% tab title="Node.js" %}

```javascript
npm install --save jsonwebtoken
```

{% endtab %}

{% tab title="Python" %}
{% code fullWidth="true" %}

```python
pip install PyJWT
```

{% endcode %}
{% endtab %}

{% tab title="PHP" %}

```php
composer require firebase/php-jwt
```

{% endtab %}

{% tab title="C#" %}

```csharp
dotnet add package System.IdentityModel.Tokens.Jwt
dotnet add package Microsoft.IdentityModel.Tokens
dotnet add package Newtonsoft.Json
```

{% endtab %}
{% endtabs %}

### **Create the token**

Next, you'll have to prepare a signed JWT defining some or all available user information. You'll have to use the private key copied from the Spot settings.

{% tabs %}
{% tab title="Node.js" %}

```javascript
const jwt = require('jsonwebtoken');
const privateKey = 'YOUR_PRIVATE_KEY';
function createToken(user) {
  const userData = {
    sub: user.id, // Your own user ID
    firstName: user.firstName,
    lastName: user.lastName,
    email: user.email,
    title: user.title, // optional
    avatarUrl: user.avatarUrl, // optional
    lang: user.lang, // optional
    timezone: user.timezone, // optional
    groups: {
      join: ["groupsId",...],
      leave: ["groupsId",...],
    }, //optional
    domains: {
      // Embed URLs to add or replace, by key
      set: {
        default: "https://app.acme.com/academy",
        customContext: "https://www.acme.com/community",
      },
      // Keys to remove
      unset: ['oldContext'],
    }, //optional
    customPropertiesValues: {
      "customPropertiesSlug1": ["valueSlug",...],
      "customPropertiesSlug2": value,
    }, //optional
  };
  return jwt.sign(userData, privateKey, { algorithm: "HS256" });
}
```

{% endtab %}

{% tab title="Python" %}

```python
import jwt

private_key = "YOUR_PRIVATE_KEY"

def create_token(user):
  user_data = {
    'sub': user.id, # Your own user ID
    'firstName': user.firstName,
    'lastName': user.lastName,
    'email': user.email,
    'title': user.title, # optional
    'avatarUrl': user.avatarUrl, # optional
    'lang': user.lang, # optional
    'timezone': user.timezone, # optional
    'groups': {
      'join': ["groupsId",...],
      'leave': ["groupsId",...],
    }, #optional
    'domains': {
      # Embed URLs to add or replace, by key
      'set': {
        'default': "https://app.acme.com/academy",
        'customContext': "https://www.acme.com/community",
      },
      # Keys to remove
      'unset': ['oldContext'],
    }, #optional
    'customPropertiesValues': {
      "customPropertiesSlug1": ["valueSlug",...],
      "customPropertiesSlug2": value,
    }, #optional
  }
  return jwt.encode(user_data, private_key, algorithm='HS256')
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
use Firebase\JWT\JWT;

$privateKey = 'YOUR_PRIVATE_KEY';

function createToken($user) {
    global $privateKey;

    $userData = [
        'sub'                   => $user['id'],          // Your own user ID
        'firstName'             => $user['firstName'],
        'lastName'              => $user['lastName'],
        'email'                 => $user['email'],
        'title'                 => $user['title'] ?? null,      // optional
        'avatarUrl'             => $user['avatarUrl'] ?? null,  // optional
        'lang'                  => $user['lang'] ?? null,       // optional
        'timezone'              => $user['timezone'] ?? null,   // optional
        'groups'                => [
            'join'  => $user['groups']['join'] ?? [],
            'leave' => $user['groups']['leave'] ?? []
        ], // optional
        'domains'               => [
            // Embed URLs to add or replace, by key
            'set'   => [
                'default'       => "https://app.acme.com/academy",
                'customContext' => "https://www.acme.com/community",
                // add other keys if necessary
            ],
            // Keys to remove
            'unset' => ['oldContext']
        ], // optional
        'customPropertiesValues' => [
            "customPropertiesSlug1" => ["valueSlug"],
            "customPropertiesSlug2" => "value"
        ] // optional
    ];

    return JWT::encode($userData, $privateKey, 'HS256');
}
?>
```

{% endtab %}

{% tab title="C#" %}

```csharp
using System;
using System.Collections.Generic;
using System.IdentityModel.Tokens.Jwt;
using System.Security.Claims;
using System.Text;
using Microsoft.IdentityModel.Tokens;
using Newtonsoft.Json;

public class JwtTokenService
{
    private readonly string _privateKey;

    public JwtTokenService(string privateKey)
    {
        _privateKey = privateKey;
    }

    public string CreateToken(User user)
    {
        var claims = new List<Claim>
        {
            new Claim("sub", user.Id),
            new Claim("firstName", user.FirstName),
            new Claim("lastName", user.LastName),
            new Claim("email", user.Email)
        };

        if (!string.IsNullOrEmpty(user.Title))
            claims.Add(new Claim("title", user.Title));

        if (!string.IsNullOrEmpty(user.AvatarUrl))
            claims.Add(new Claim("avatarUrl", user.AvatarUrl));

        if (!string.IsNullOrEmpty(user.Lang))
            claims.Add(new Claim("lang", user.Lang));

        if (!string.IsNullOrEmpty(user.Timezone))
            claims.Add(new Claim("timezone", user.Timezone));

        if (user.Groups != null)
        {
            if (user.Groups.Join != null && user.Groups.Join.Length > 0)
                claims.Add(new Claim("groups.join", JsonConvert.SerializeObject(user.Groups.Join)));

            if (user.Groups.Leave != null && user.Groups.Leave.Length > 0)
                claims.Add(new Claim("groups.leave", JsonConvert.SerializeObject(user.Groups.Leave)));
        }

        if (user.Domains != null)
        {
            if (user.Domains.Set != null && user.Domains.Set.Count > 0)
                claims.Add(new Claim("domains.set", JsonConvert.SerializeObject(user.Domains.Set)));

            if (user.Domains.Unset != null && user.Domains.Unset.Length > 0)
                claims.Add(new Claim("domains.unset", JsonConvert.SerializeObject(user.Domains.Unset)));
        }
 
        if (user.CustomPropertiesValues != null)
        {
            foreach (var kvp in user.CustomPropertiesValues)
            {
                claims.Add(new Claim($"customPropertiesValues.{kvp.Key}", JsonConvert.SerializeObject(kvp.Value)));
            }
        }

        var tokenHandler = new JwtSecurityTokenHandler();
        var key = Encoding.UTF8.GetBytes(_privateKey);
        
        var tokenDescriptor = new SecurityTokenDescriptor
        {
            Subject = new ClaimsIdentity(claims),
            SigningCredentials = new SigningCredentials(
                new SymmetricSecurityKey(key), 
                SecurityAlgorithms.HmacSha256)
        };

        var token = tokenHandler.CreateToken(tokenDescriptor);
        return tokenHandler.WriteToken(token);
    }
}

public class User
{
    public string Id { get; set; }
    public string FirstName { get; set; }
    public string LastName { get; set; }
    public string Email { get; set; }
    public string Title { get; set; }
    public string AvatarUrl { get; set; }
    public string Lang { get; set; }
    public string Timezone { get; set; }
    public Groups Groups { get; set; }
    public Domains Domains { get; set; }
    public Dictionary<string, object> CustomPropertiesValues { get; set; }
}

public class Groups
{
    public string[] Join { get; set; }
    public string[] Leave { get; set; }
}

public class Domains
{
    public Dictionary<string, string> Set { get; set; }
    public string[] Unset { get; set; }
}
```

{% endtab %}
{% endtabs %}

You can use all the following fields in the JWT:

<table><thead><tr><th width="152">Parameter</th><th width="98">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>sub</code></td><td>string</td><td><p><strong>(required)</strong></p><p>The ID of the user in your product or platform. This value will be stored as an external ID in MeltingSpot. It should be 255 characters or less.</p></td></tr><tr><td><code>firstName</code></td><td>string</td><td><p><strong>(required)</strong></p><p>The first name of the user. It should be 255 characters or less.</p></td></tr><tr><td><code>lastName</code></td><td>string</td><td><p><strong>(required)</strong></p><p>The last name of the user. It should be 255 characters or less.</p></td></tr><tr><td><code>email</code></td><td>string</td><td><p><strong>(required)</strong></p><p>The email of the user. This email address is considered as a verified address. You should make sure you've verified it on your side. It should be 255 characters or less and follow a valid email address format.</p></td></tr><tr><td><code>title</code></td><td>string</td><td>The job title of the user in plain text format.</td></tr><tr><td><code>avatarUrl</code></td><td>string</td><td>A full URL to the user's profile picture. It should include https:// or http://. You should make sure it's a valid URL on your side.</td></tr><tr><td><code>lang</code></td><td>string</td><td><p>The default locale to apply in the application. Currently, MeltingSpot supports:</p><ul><li><code>en</code> for English</li><li><code>fr</code> for French</li><li><code>de</code> for Deutsch</li><li>If not specified or invalid, it will default to <code>en</code>.</li></ul></td></tr><tr><td><code>timezone</code></td><td>string</td><td>The default timezone to apply in the application. If not specified or invalid, it will default to <code>Europe/Paris</code>.</td></tr><tr><td><code>iat</code></td><td>number</td><td>The issue time of the JWT.</td></tr><tr><td><code>exp</code></td><td>number</td><td>The expiration time of the JWT. Although this value is not required, it's highly recommended to set it to 60 seconds from now. If not set, the token will be valid forever and can introduce security issues.</td></tr><tr><td><code>groups:join</code></td><td>string[]</td><td>The groups to which you want to add the member. Simply retrieve the id of the groups in question from the group selection menu of the audience table.</td></tr><tr><td><code>groups:leave</code></td><td>string[]</td><td>The groups whose members you wish to remove. Simply retrieve the id of the groups in question from the group selection menu in the audience table.</td></tr><tr><td><code>customPropertiesValues</code></td><td><em>property type</em></td><td>If you have custom properties, you can specify the value these properties will take on for the member.</td></tr><tr><td><code>domains: set</code></td><td>object</td><td><p>If you have embedded the Spot into several domains, specify the embed URLs the member should be redirected to, as a <code>{ key: URL }</code> object (50 keys maximum, 255 characters maximum per URL).</p><p>The keys passed are added or replaced at each SSO login; other keys already stored are kept. The member will be redirected to the URL of the <code>default</code> key when clicking on a notification email. <a href="/english/manage-spot/embed/multi-domains.md">Learn more</a></p></td></tr><tr><td><code>domains: unset</code></td><td>string[]</td><td><p>The keys of the embed URLs to remove from the member (URL of a software for which the member no longer has a license, website whose URL has changed...), 50 keys maximum.</p><p><code>unset</code> is applied after <code>set</code>: a key present in both is removed.</p></td></tr></tbody></table>

## Mode 1: Authorization URL SSO

This mode delegates login to your own authentication page via a browser redirection.

{% hint style="info" %}
This section describes the **Redirect to your website (JWT)** sign-in method. Do you have an identity provider compatible with OpenID Connect? See [#mode-1-with-openid-connect-connect-your-identity-provider](#mode-1-with-openid-connect-connect-your-identity-provider "mention").
{% endhint %}

There are 2 main user journeys:

{% tabs %}
{% tab title="From your App" %}

1. Your user clicks on a link in your app to enter your Spot.
2. Clicking on this link triggers the creation of a signed token (see above).
3. Your app redirects the user to your Spot and passes the token along.
4. If we can validate the token, we log the user in and identify them using the information passed in the token (like their name and email address).
   {% endtab %}

{% tab title="From your Spot" %}

1. A user who clicks on `Login` or `Join` on your Spot (go.meltingspot.io/spot/...) will be redirected to a page on your website (the `authorisation URL`, see below).
2. On your app, the user will need to login or sign up.
3. Your app will generate a signed token (see how to above).
4. Your app will redirect the user to your Spot and pass the token along.
5. If we can validate the token, we log the user in and identify them using the information passed in the token (like their name and email address).

<figure><img src="https://3055204660-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrzBxnWaSListMwx3rzKu%2Fuploads%2FltD1DS2waCoJPs7DxYEw%2Fimage.png?alt=media&#x26;token=ae1e779f-c746-4a54-9a50-d32e6d6e6d6e" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

### Implementation

#### 1. Enable JWT SSO in your Spot settings

First, you will need to activate the SSO in your Spot settings. In the "Flow-based SSO" tab, choose the **Redirect to your website (JWT)** sign-in method, then:

1. Add an authorisation URL. It is the URL of the page where the user is redirected to be authenticated on your side (2nd bullet point in the "[From your Spot](#from-your-spot)" flow).\
   *👀 If you want to run local tests, use `127.0.0.1` in the URL, as `localhost` URLs are blocked by our system.*
2. Copy your private key.
3. Turn SSO on once you are ready.

<figure><img src="https://3055204660-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrzBxnWaSListMwx3rzKu%2Fuploads%2FY5Mv1r33J97tJOC7Y6wp%2Fimage.png?alt=media&#x26;token=06d3b0c7-a7e7-4780-b4db-c60f2c3d6465" alt=""><figcaption></figcaption></figure>

You will need to create a custom signed link for your app that would automatically pass information to your Spot, such as: the email, first and last name of the member you want to log in.

#### **2. Generate a token**

See the section above.

#### **3. Redirection to MeltingSpot**

Once the user token has been created, you need to redirect the user to a URL by passing the token as a parameter. This URL is supplied to you as a parameter (`redirectUrl`) when the user lands on your authorization URL. Basically, it looks like this:

```url
https://go.meltingspot.io/spot/<Your Spot ID>/sso/jwt
```

You need to add the token as a parameter as follows:

```url
https://go.meltingspot.io/spot/<Your Spot ID>/sso/jwt?ms_token=<Your generated SSO Token>
```

In most cases, the redirect URL we provide (`redirectUrl`) also contains a referrerUrl parameter that returns the user to the page they were on when they logged in in SSO mode.

You can force the value of this parameter, but to be valid, the value must represent a path relative to `https://go.meltingspot.io` and your Spot (e.g. `?referrerUrl=/spot/129487c9-6acc-43d9-ab96-182ded763538/lives`).

{% hint style="info" %}
Your Spot ID is the string following spot/ in your Spot's url (eg: `go.meltingspot.io/spot/129487c9-6acc-43d9-ab96-182ded763538` -> Spot ID is `129487c9-6acc-43d9-ab96-182ded763538`).
{% endhint %}

#### Embed / widgets + SSO = ❤️ <a href="#embed-widgets--sso" id="embed-widgets--sso"></a>

Once SSO authentication has been set up for your Spot, you can pass on the JWT token authenticating the user in the Spot embed or widget installation scripts. This will enable every user in your space to access the embed or widget with a connected status. When displaying your Spot in embed, your members will no longer have to click on 'Continue with SSO' to sign up or log in 😉

To do this, you need to add the `authToken` parameter to the embed or widget installation script parameters.

<figure><img src="https://3055204660-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrzBxnWaSListMwx3rzKu%2Fuploads%2F9IFNwY0NNcvsu3KRe1ix%2Fimage.png?alt=media&#x26;token=b9d25b99-c335-4de8-9d3c-3934f576ee75" alt="SSO authentication in embed and widgets script" width="563"><figcaption></figcaption></figure>

## Mode 1 with OpenID Connect: connect your identity provider

Your teams or customers already sign in to your tools with an identity provider? Connect it to your Spot. MeltingSpot talks to your provider itself, creates or finds the member, then opens their session. **You have no login page to build and no token to generate.**

Any provider compatible with the OpenID Connect standard works: Keycloak, Salesforce, Microsoft Entra, Google Workspace, Okta...

### Your users' journey

1. On your Spot's login page, the user clicks "Continue with SSO" (customizable label).
2. They are sent to your provider's login page. If they are already signed in there, they are sent back right away, without typing anything.
3. MeltingSpot checks your provider's response, creates or updates the member, then logs them in to the Spot.
4. The user lands on the page they had requested, or on the Spot's home page.

{% hint style="info" %}
No personal data goes through the URL: unlike the JWT method, MeltingSpot gets the user's information directly from your provider.
{% endhint %}

### Implementation

#### 1. Choose OpenID Connect

In `Settings > Single Sign-On`, "Flow-based SSO" tab, choose **OpenID Connect** in the **Sign-in method** field.

#### 2. Fill in your identity provider

In the **Identity provider** block, enter the information given to you by your provider's administrator:

| Field                            | Description                                                                                                                                                         |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Issuer URL**                   | Your provider's address (the "issuer"). For example, for Keycloak: `https://auth.example.com/realms/my-realm`.                                                      |
| **Client ID**                    | MeltingSpot's identifier at your provider.                                                                                                                          |
| **Client type**                  | **Public**: PKCE, no client secret (e.g. Keycloak). **Confidential**: PKCE and client secret (e.g. Salesforce).                                                     |
| **Client secret**                | Confidential only. It is stored encrypted and never displayed again. Leave the field unchanged to keep the current secret.                                          |
| **Client authentication method** | Confidential only: client secret in request body (`client_secret_post`) or HTTP Basic authentication (`client_secret_basic`). Choose the one your provider expects. |
| **Scopes**                       | The information requested from your provider. `openid` is required, `profile` and `email` are suggested by default. Type a scope and press Enter to add one.        |

Then click **Test connection**: MeltingSpot reads the configuration published by your provider and confirms it can be used.

#### 3. Register the callback URL with your provider

Copy the **callback URL** shown under the block and send it to your provider's administrator. They must register it as an allowed redirect address. It looks like this:

```url
https://go-api.meltingspot.io/spot/<Your Spot ID>/sso/oidc/callback
```

It is specific to your Spot and never changes.

{% hint style="warning" %}
Some providers, like Salesforce, compare the address character by character and take several minutes to apply a change. Copy it as is.
{% endhint %}

#### 4. Choose the member's information

In the **Field mapping** block, set for each MeltingSpot field which claim (information sent by your provider) fills it. The default values follow the OpenID Connect standard:

| MeltingSpot field     | Default claim |
| --------------------- | ------------- |
| First name (required) | `given_name`  |
| Last name (required)  | `family_name` |
| Email (required)      | `email`       |
| Job title             | none          |
| Avatar URL            | `picture`     |
| Language              | `locale`      |
| Timezone              | `zoneinfo`    |

You can also fill your **custom properties**: click **Add custom property**, type the source claim (it can be nested, for example `custom_attributes.department`) and choose the property. For a choice property, match each value from your provider to a MeltingSpot option.

{% hint style="info" %}
The available claims depend on your provider and its configuration. A missing claim or an unknown value is simply ignored: it never blocks the login.
{% endhint %}

#### 5. Save and turn on SSO

Click **Save**, then turn on SSO. As with the JWT method, you can customize the label of the login buttons and add a URL for user assistance.

### What about the embed?

When your Spot is embedded in your website, your provider's login page cannot be displayed inside the iframe: providers forbid it for security reasons. When the user clicks "Continue with SSO", a **login window** therefore opens next to your website. It closes as soon as the user is authenticated, and the embed logs them in automatically.

If the user is already signed in at your provider, the window opens and closes almost immediately.

{% hint style="info" %}
If you restrict the embed iframe yourself (`sandbox` attribute), allow pop-ups (`allow-popups` and `allow-popups-to-escape-sandbox`).
{% endhint %}

For your users to see no login screen at all when the embed loads, the JWT token of the Programmatic mode (`authToken` parameter) remains available, alongside OpenID Connect.

## Mode 2: Programmatic SSO

This mode lets your backend or our Coach SDK exchange a signed token directly for a MeltingSpot session, with no browser redirection.

### Configuration

In the **"Token-based SSO"** tab of the SSO settings, there's only one setting: a `Enable programmatic authentication (SDK)` switch.

### Using auto-join in the Coach SDK

Once this mode is enabled, pass the generated JWT token (see "Generating a token" above) as `authToken` to our **Coach** SDK, and add the `autoJoin` flag:

{% code overflow="wrap" %}

```
import { Coach } from '@meltingspot/coach';await Coach.start({  spotId: 'YOUR_SPOT_ID',  authToken: 'CURRENT_USER_SSO_TOKEN', // the same JWT used for simple authentication  autoJoin: true, // automatically joins and validates the member on the Spot});
```

{% endcode %}

The Coach re-authenticates the user with this token, then calls the auto-join API on your behalf, passing it the same signed JWT. The Spot derives first name, last name, email, groups, domains and custom properties directly from the token's claims — no need to send them again separately.

{% hint style="info" %}

* `autoJoin` requires `authToken`: without it, the option is ignored (no join is attempted).
* Auto-join follows the usual status transition rules: a member who has already been **rejected** or **deactivated** won't be automatically unblocked.
* If auto-join fails, the Coach's startup fails entirely and the authentication is rolled back — this isn't a silent "best-effort" mechanism, it must be treated as a blocking error on the integration side.
  {% endhint %}

## Good to know

* **Do I need to enable both modes?**\
  No, they're independent. Enable "Authorization URL" if you want a classic SSO login button on your site; enable "Programmatic" if you're integrating our SDKs or calling our API directly. Nothing stops you from enabling both in parallel.
* **Do I need to choose between JWT and OpenID Connect?**\
  For the login through the "Continue with SSO" button, yes: only one method is active at a time. Choose OpenID Connect if you have an identity provider, JWT if you'd rather manage the login page yourself.\
  The Programmatic mode (Coach SDK, `authToken` parameter of the embed and widgets) stays based on JWT and works in parallel, whatever the method you choose.
* **Do I need to generate a different token for auto-join?**\
  No. It's exactly the same JWT, with the same claims and the same secret key as for classic programmatic authentication. The only difference is the `autoJoin: true` option on the Coach SDK side.
* **In Programmatic mode, why is my user authenticated but not a member of the Spot?**\
  In "Programmatic" mode, authentication and joining the Spot are two separate steps (unlike "Authorization URL" mode, where they're automatically linked). Use `autoJoin: true` on the Coach SDK, or handle joining separately via your integration.
* **In Programmatic mode, what happens if a member has already been rejected or deactivated?**\
  Auto-join follows the existing status transition rules: it won't "unblock" a rejected or deactivated member. The member must be in a state that allows acceptance for auto-join to succeed.
* **What happens when a user joins a Spot via SSO?**\
  With a JWT token (JWT method or Programmatic mode), as long as the token is valid: if the member doesn't exist, we create a new user based on the information passed in the token and log them in. If they already exist, we log them in without updating their profile information (first name, last name, title, avatar…). However, the `groups`, `domains` and `customPropertiesValues` parameters of the token are applied at each login.\
  With OpenID Connect, the profile is updated at each login: first name, last name, job title, avatar and custom properties are read again from your provider, according to your field mapping. The email of the MeltingSpot account, however, is never changed by an SSO login.
* **What happens to existing users when I enable SSO?**\
  Regardless of the mode: if you enable SSO while you already have registered members on your Spot, no problem — they can keep using their current credentials (email + password). They'll also be able to log in via SSO and add this identification method to their profile, as long as the email associated with their SSO account matches the one used on the Spot.
* **With OpenID Connect, how is a user recognized?**\
  MeltingSpot first recognizes the user by their identifier at your provider. Even if their email changes on your side, they find their account and history again.\
  On their very first login, if a MeltingSpot account already exists with the same email, it is linked to that account. If that account was not yet a member of your Spot, its owner receives an information email about this link.
* **My Spot is private, how are sign-ups handled in SSO mode?**\
  In "Authorization URL" mode (JWT method as well as OpenID Connect): since the user goes through your login page or your provider before joining the Spot, we consider they've already been validated by you — they're automatically accepted, even if the Spot is private. With OpenID Connect, a member you have rejected or deactivated cannot log in again via SSO.\
  In "Programmatic" mode, this isn't automatic: authentication alone doesn't make the user join the Spot. With `autoJoin: true`, the member is added following the usual status transition rules (a member who has already been rejected or deactivated won't be unblocked) — so it isn't a guaranteed acceptance like in redirect mode.
* **What happens if a user changes their email in my application?**\
  With the JWT method, the next time they log in to the Spot, we'll treat them as a new user. If they want to access their old profile on the Spot, they'll need to log in via email + password.\
  With OpenID Connect, they find their account again: the user is recognized by their identifier at your provider, not by their email.
* **Can I decide the landing page a member opens when they log in via SSO?**\
  Yes! When one of your users accesses your Spot from your application, you can use the `referrerUrl` parameter to send them to any page on your Spot.
* **The OpenID Connect connection test fails, what should I do?**
  * *We couldn't reach this issuer*: check the URL and that it is publicly accessible (no address internal to your network).
  * *No valid OpenID Connect configuration was found at this URL*: the URL does not point to the issuer. For Keycloak, it must include the realm (`/realms/<name>`).
  * *The issuer in the discovery document doesn't match this URL*: check for a missing or extra trailing slash.
  * *This provider doesn't support PKCE with S256*: PKCE is required for security reasons. Enable it at your provider.
* **With OpenID Connect, a user sees "You don't have access to this space", why?**\
  Your organization asked MeltingSpot to check each user's access rights against your own system, at each login. That system denied access to this user: reach out to the administrator of your access rights. This check is optional and set up by the MeltingSpot team, on request. Contact us if you need it.
* **How are handled members' status (Invited / Pending / Declined / Rejected / Deactivated / Left) when they join / reconnect to a Spot with SSO?**\
  [-> Check it here!](/english/manage-spot/audience/members/members-status.md#member-status-update-rules-on-registration-or-connection)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.meltingspot.io/english/manage-spot/sso.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
