Help

Integration

Zulip OIDC Integration

Updated 1 Nov 2026 10 min read

This document explains how to implement Monosign with Zulip, the open-source team chat. It covers Single Sign-On with OpenID Connect (OIDC), which is built into Zulip as the Generic OpenID Connect authentication backend. Zulip reads the Monosign addresses from the OIDC discovery document and uses the Authorization Code flow, so the OIDC/OpenID access key of Monosign is used. Before you continue, it is better to read the Zulip documentation (opens in a new tab) about OpenID Connect.

This configuration was tested with Zulip 12.3. If your version is different, please check the Zulip documentation.

Zulip supports OpenID Connect and SAML 2.0 natively. There is no single sign-on screen in the Zulip web interface; the authentication methods are configured in the settings of the Zulip server. The SAML integration is described in a separate document.

Monofor has no responsibility to do Zulip configurations. If you need support please contact the Zulip community or your Zulip support provider.

Zulip is free and open source (Apache 2.0). Single sign-on with OpenID Connect is not limited by a license key.

Instructions

This documentation contains 6 main steps for integration.

  1. Creating an application on Monosign

  2. Configuring the OIDC/OpenID settings on Monosign

  3. Assign a user to the Zulip application

  4. Configuration Single Sign-On for Zulip

  5. Sign In Test

  6. Starting the sign-in from the Monosign portal (IdP-initiated workaround)

1- Creating an Application on Monosign

Create your application on Monosign first. Open the Applications page from the left menu and click Add New.

image-20261030-191725.png

Zulip is not in the application catalog, so click Create from scratch.

image-20261030-191750.png

Fill in the application details on the Application tab and click Next.

Property

Value

Description

Name

Zulip

Name of the application shown to users on the Monosign portal and on the Monosign sign-in page.

Type

Web

Zulip is accessed through a web browser. Options: Web, Mobile, Desktop, API.

Url

Optional

Leave empty or enter the address of Zulip (for example https://<zulip-address>). The sign-in is started from the Zulip login page with the Log in with Monosign button (see step 5). To start the sign-in from the Monosign portal, see step 6.

Logo

Optional

Browse and upload a logo; it is also shown on the Monosign sign-in page.

Users can see this application on their list

Enabled

Displays the application on the user portal.

On the Access tab define who can reach the application and click Create Application.

image-20261030-192040.png

Property

Value

Description

User Access Type

System Default

Defines which users can access this application. Options: Only Assigned Users, All Users, System Default.

User Group Access Type

System Default

Defines the application’s user group access.

Source Using Type

System Default

Defines which user sources the application can use.

Profile Access Type

All

Defines which user profile attributes are available to the application (Options: Restricted, All). Zulip needs the e-mail address and the name of the user.

With auto_signup enabled (step 4), Zulip creates an account for every Monosign user who signs in for the first time. Make sure the effective User Access Type is Only Assigned Users and give access only to the users you assign in step 3.

After the application is created, click Keys and add a new Access Key for OIDC/OpenID access.

image-20261030-192203.png

Select OIDC/OpenID as the key type and click Create. Monosign generates the Client Id and Client Secret automatically.

image-20261018-104856.png

Property

Value

Options

Type

OIDC/OpenID

Rest API, OAuth 2.0, JWT, OIDC/OpenID, SAML, RADIUS, Access Gateway, LDAP, AuthN/Z Server

Client Id / Client Secret

Generated automatically

Use the eye icon next to the secret to reveal it. Both values are required in step 4.

Session

System Default

System Default, On-demand, Permanent

State

Enabled

Enabled, Disabled

Never Expires

Yes

Turn off to define a specific expiration date for the key.

Configuration details for the Zulip application are provided as follows:

image-20261031-211130.png

Monosign value

Example

Used in Zulip as

Client Id

<client-id>

client_id

Client Secret

<client-secret>

secret (stored as social_auth_oidc_secret in the Zulip secrets file)

Configuration Url

https://<monosign-host>/.well-known/openid-configuration

oidc_url. Zulip adds /.well-known/openid-configuration itself, so enter only the address of Monosign, without a slash at the end: https://<monosign-host>.

2- Configuring the OIDC/OpenID Settings on Monosign

Open the Keys tab of the application and click the Configure button of the OpenID Connect (OIDC) key to open the OIDC/OpenID settings.

image-20261031-211438.png

Add the return address of Zulip to Allowed Redirect URIs, then press Update.

image-20261101-195324.png

Property

Value

Description

Allowed Redirect URIs

https://<zulip-address>/complete/oidc/

The address where Monosign sends the user back after sign-in (the Return URL of Zulip). The path /complete/oidc/ is fixed by Zulip and must end with a slash. Use the public (HTTPS) address of Zulip, which is the EXTERNAL_HOST of the server.

Scope

Optional

Zulip requests the scopes it needs by itself, so the field can stay empty.

Other fields

Empty / default

The other fields (Signing Key, Issuer, Audience, Resource, token lifetimes, CORS, Initiate Login URI) are not needed. Do not enter the return address in the Resource field. Starting the sign-in from the Monosign portal is configured on the Login tab of the application (step 6).

Zulip identifies the user by the e-mail address in the ID token and takes the full name from the name claim. Monosign returns email and name by default, so a claim mapping is not required. If a Zulip account with the same e-mail address already exists, the user signs in to that account.

3- Assign a User to the Zulip Application

Open the application in Monosign, click the Assignments tab and click Assign a User.

image-20261030-193315.png

Search and select the users who can sign in to Zulip, check the Expiration Date and save. You can select more than one user.

image-20261030-193652.png

Property

Value

Description

User(s)

Selected users

Users who can sign in to Zulip with Monosign.

Expiration Date

Default one year

The assignment expires on this date.

4- Configuration Single Sign-On for Zulip

As we mentioned at the start, please check out the Zulip documentation first. The OpenID Connect provider is added to the settings file /etc/zulip/settings.py of the Zulip server. Replace the placeholder values, enable the backend zproject.backends.GenericOpenIdConnectBackend in AUTHENTICATION_BACKENDS and restart Zulip.

AUTHENTICATION_BACKENDS = (
    "zproject.backends.EmailAuthBackend",
    "zproject.backends.GenericOpenIdConnectBackend",
)

SOCIAL_AUTH_OIDC_ENABLED_IDPS = {
    "monosign": {
        "oidc_url": "https://<monosign-host>",
        "display_name": "Monosign",
        "client_id": "<client-id>",
        "secret": get_secret("social_auth_oidc_secret"),
        "auto_signup": True,
    },
}
SOCIAL_AUTH_OIDC_FULL_NAME_VALIDATED = True

Save the client secret of Monosign in the secrets file /etc/zulip/zulip-secrets.conf of the server:

social_auth_oidc_secret = <client-secret>

Setting

Value

Description

AUTHENTICATION_BACKENDS

GenericOpenIdConnectBackend

Enables OpenID Connect. Keep EmailAuthBackend in the list to be able to sign in with a password as well.

idp name (key of the dictionary)

monosign

Identifier of the provider. It appears in the addresses of the sign-in flow (also in the Login Url of step 6), but it is not shown to users.

oidc_url

https://<monosign-host>

Address of Monosign without a slash at the end. Zulip reads the configuration from {oidc_url}/.well-known/openid-configuration. Monosign must be reachable from the Zulip server.

display_name

Monosign

Text of the sign-in button (Log in with Monosign).

client_id / secret

Client Id / Client Secret

Copied from the Monosign OIDC/OpenID Access Key Details created in the first step. The secret is read from the secrets file with get_secret.

auto_signup

True

Optional. Creates the Zulip account at the first sign-in. By default Zulip asks the user whether to create an account or to use another sign-in method.

SOCIAL_AUTH_OIDC_FULL_NAME_VALIDATED

True

Optional. Zulip trusts the name from Monosign and does not show the registration form to new users.

Invitation-only organizations. A new Zulip organization accepts new users only by invitation. In that case a new Monosign user cannot create an account, even with auto_signup enabled, and Zulip shows the message You need an invitation to join this organization. Either invite the user with the same e-mail address, or open Organization settings → Organization permissions in Zulip and change Joining the organization so that an invitation is not required. Then access is controlled by the assignments in Monosign (step 3).

After changing the settings, restart the Zulip server (su zulip -c '/home/zulip/deployments/current/scripts/restart-server'). With the official Docker image the same values are given with the environment variables ZULIP_AUTH_BACKENDS and ZULIP_CUSTOM_SETTINGS, and the secret as the Docker secret zulip__social_auth_oidc_secret. The authentication methods that are enabled on the server are listed and can be switched on or off in Organization settings → Authentication methods.

5- Sign In Test

Now try to log in to Zulip using Monosign SSO. Open a new browser window (or a private window) and type the address of Zulip. The login page of Zulip shows the Log in with Monosign button below the e-mail and password form.

image-20261031-213350.png
  1. Click the Log in with Monosign button.

  2. On the Monosign sign-in page log in passwordless with your QR code (Monofor Identity), with a Passkey or with your user name and password (Sign in with Password). If you are already signed in to Monosign, the page is skipped.

  3. After the sign-in Monosign redirects the browser back to Zulip (/complete/oidc/). At the first sign-in Zulip creates the account with the name and the e-mail address from Monosign (the user becomes a Member) and opens the organization.

image-20261101-194227.png

6- Starting the Sign-In from the Monosign Portal (IdP-Initiated Workaround)

In OpenID Connect the application must start every sign-in, because it creates the state and nonce values that it checks in the answer. Zulip therefore does not accept an unsolicited answer from Monosign, and a real IdP-initiated sign-in is not possible with OIDC (for a real IdP-initiated sign-in use the SAML integration). As a workaround, Monosign can open the sign-in start address of Zulip when the user clicks the application on the Monosign portal. This is the same address that the Log in with Monosign button uses, so for the user it works as if the button was pressed. If the user already has a Monosign session, the Zulip login page and the Monosign sign-in form are skipped.

Open the application in Monosign, click Edit, go to the Login tab, set the Login Method and the Login Url and click Save.

image-20261101-200729.png

Property

Value

Description

Login Method

OpenID [OAuth2.0]

The application is opened with the OpenID Connect key of step 1.

Login Url

https://<zulip-address>/accounts/login/social/oidc/monosign?next=/

Sign-in start address of Zulip. The part monosign is the name of the provider in SOCIAL_AUTH_OIDC_ENABLED_IDPS (step 4); next=/ opens the home page after the sign-in.

Login Callback Url

Empty

Not needed.

Login Form Type / Login Policy Type

System Default

Default values.

Zulip ignores the extra parameters that an OpenID Connect third-party initiated login can add to the address (iss, login_hint, target_link_uri), so they do no harm. The same approach works for other applications that have a sign-in start address.

Troubleshooting

Symptom

Cause

Solution

The Log in with Monosign button is not shown

The backend GenericOpenIdConnectBackend is not in AUTHENTICATION_BACKENDS, the server was not restarted after the change, or the method is switched off in the organization settings.

Enable the backend and the provider (step 4), restart Zulip and check Organization settings → Authentication methods.

Monosign shows a redirect URI error

The redirect address that Zulip sends does not exactly match the Allowed Redirect URIs, for example because the slash at the end is missing, EXTERNAL_HOST is wrong, or the address was entered in another field such as Resource.

Add https://<zulip-address>/complete/oidc/ to Allowed Redirect URIs in Monosign (step 2) and set EXTERNAL_HOST to the same host name.

An error page appears after returning from Monosign

The Client Id or Client Secret is wrong, oidc_url is wrong, or Zulip cannot reach Monosign.

Copy the values again from the Monosign access key (step 1), check that {oidc_url}/.well-known/openid-configuration opens from the Zulip server and read the Zulip log /var/log/zulip/errors.log.

Zulip shows You need an invitation to join this organization

The organization accepts new users only by invitation.

Invite the user or change Joining the organization (step 4).

Zulip asks whether to create an account

There is no Zulip account with the e-mail address of the Monosign user and auto_signup is not enabled.

Set "auto_signup": True or invite the user with the same e-mail address.

The application on the Monosign portal opens the Zulip login page, or a page that is not found

The Login Url of step 6 is empty or wrong, for example oidc:monosign instead of oidc/monosign, or the provider name is different from the one in SOCIAL_AUTH_OIDC_ENABLED_IDPS.

Use exactly https://<zulip-address>/accounts/login/social/oidc/<provider-name>?next=/ and save the Login tab again.

A user cannot sign in

The user is not assigned to the application.

Assign the user in step 3.

After completing the configuration on Zulip and Monosign, it is better to test in a new private browser window if the OIDC SSO doesn’t work, because old session cookies may cause errors.

Permanent link