Set up OIDC SSO with Auth0
This guide walks you through configuring Auth0 as the OIDC identity provider for Gluesync CoreHub. It covers the Auth0 dashboard configuration, the Action that injects role claims into the tokens, and the corresponding CoreHub configuration.
For the underlying OIDC concepts (claim path syntax, role mapping rules, login flow), see OIDC (OpenID Connect) Authentication.
Before you begin
You need:
-
An Auth0 tenant. The free Auth0 by Okta plan is sufficient.
-
Administrative access to your Gluesync CoreHub.
-
The HTTPS URL of your Gluesync instance (referred to below as
https://gluesync.example.com). -
The Authorization Core feature enabled in Auth0. This is on by default for all tenants.
High-level flow
-
Register a Regular Web Application in Auth0.
-
Create the Auth0 roles you want to map to Gluesync roles (
manager,viewer, etc.). -
Assign the roles to your users.
-
Create a Post-Login Action that adds the assigned roles to the ID and access tokens as a namespaced custom claim.
-
Deploy the Action and attach it to the Login flow.
-
Configure OIDC in Gluesync CoreHub, pointing
roleClaimPathat the same namespace used in the Action.
Step 1 — Register the application in Auth0
-
Log in to the Auth0 Dashboard and select your tenant.
-
Go to Applications → Applications → Create Application.
-
Name it (for example
Gluesync CoreHub), select Regular Web Applications, and click Create. -
On the application page, open the Settings tab and fill in:
Field Value Allowed Callback URLs
https://gluesync.example.com/oidc/callbackAllowed Logout URLs
https://gluesync.example.com/ui/v2/loginAllowed Web Origins
https://gluesync.example.com -
Scroll down and click Save Changes.
-
At the top of Settings, note the Domain, Client ID, and Client Secret — you will paste them into Gluesync in Step 5.
|
The Auth0 Domain is the base of the OIDC |
|
Allowed Logout URLs must include the exact URI Gluesync does not take a custom Signout URL in Settings → OIDC Authentication. It uses Auth0’s discovery |
Step 2 — Create roles in Auth0
-
In the dashboard, go to User Management → Roles.
-
Click Create Role, name it (for example
manager), give it a short description, and save. Repeat for each role you want to expose to Gluesync (a typical setup ismanagerandviewer). -
Optionally add permissions to the roles. Gluesync only needs the role name, so permissions inside Auth0 are not required for the integration to work.
Step 3 — Assign roles to a test user
-
Go to User Management → Users and pick (or create) a test user, for example
peppe.scarpa@example.com. -
Open the user, switch to the Roles tab, click Assign Roles, select the role created in Step 2, and confirm.
Step 4 — Inject roles into the tokens with a Post-Login Action
By default, Auth0 does not include role names in the ID token or in the /userinfo response. You need to inject them via a Post-Login Action using a namespaced custom claim.
Create the Action
-
Go to Actions → Library → Build Custom.
-
Click Create Action, give it a name (for example
Gluesync — inject roles), choose the Login / Post Login trigger, leave the runtime at the default Node.js version, and click Create. -
Replace the code with the following:
exports.onExecutePostLogin = async (event, api) => { const namespace = 'https://gluesync.com'; if (event.authorization && event.authorization.roles) { api.idToken.setCustomClaim(`${namespace}/roles`, event.authorization.roles); api.accessToken.setCustomClaim(`${namespace}/roles`, event.authorization.roles); } };The
namespacevalue is arbitrary, but it must be a URI (Auth0 enforces this) and it must match theroleClaimPathyou configure in Gluesync. The convention used throughout the Gluesync documentation ishttps://gluesync.com, which produces the claim namehttps://gluesync.com/roles.You can use any domain you control. Auth0 strips any claim whose key starts with reserved namespaces such as
auth0.com,webtask.io, orwebtask.run. -
Click Deploy.
Attach the Action to the Login flow
Deploying alone is not enough — you must also attach the Action to the Login flow.
-
Go to Actions → Flows → Login.
-
Drag the new Action from the Custom tab onto the flow, between Start and Complete.
-
Click Apply.
|
You can verify the Action runs by opening it from Actions → Library and pressing Test. The result should show your custom claim in the returned |
Step 5 — Configure OIDC in Gluesync CoreHub
-
Log in to CoreHub as the local
adminuser. -
Go to Settings → OIDC Authentication.
-
Fill in the configuration:
Field Value Enable OIDC
toggle on
Provider Name
Auth0Issuer URL
https://your-tenant.auth0.com(or.eu.auth0.com,.us.auth0.comdepending on your tenant region)Client ID
from Step 1
Client Secret
from Step 1
Redirect URI
https://gluesync.example.com/oidc/callback(the UI auto-fills this; it must exactly match what you configured in Auth0)Scopes
openid,profile,emailRole Claim Path
https://gluesync.com/roles— must match thenamespace + "/roles"from your ActionDefault Role
VIEWERAuto-provision Users
on
Role Mappings
{ "manager": "MANAGER", "viewer": "VIEWER" } -
Click Save.
Equivalent REST API payload:
{
"enabled": true,
"providerName": "Auth0",
"issuerUrl": "https://your-tenant.auth0.com",
"clientId": "your-auth0-client-id",
"clientSecret": "your-auth0-client-secret",
"redirectUri": "https://gluesync.example.com/oidc/callback",
"scopes": ["openid", "profile", "email"],
"roleClaimPath": "https://gluesync.com/roles",
"defaultRole": "VIEWER",
"autoProvisionUsers": true,
"roleMappings": {
"manager": "MANAGER",
"viewer": "VIEWER"
}
}
Step 6 — Verify
-
Log out of Gluesync (or open a new private browser window).
-
On the login page, click Login with Auth0.
-
Authenticate with the test user (
peppe.scarpa@example.com). -
After redirect, you should be logged into CoreHub.
To confirm the role was mapped correctly:
-
Decode the MOLO17 session token at https://jwt.io (the token is available in the browser dev tools as a cookie or visible in the response of the
/oidc/callback?code=…request). -
The payload must show the role you expect, for example:
{ "iss": "MOLO17", "sub": "peppe.scarpa@example.com", "plan": "trial", "role": "MANAGER" } -
Also confirm the user appears in Settings → User Management with an
OIDCbadge and the resolved role.
Troubleshooting
The MOLO17 token still shows "role": "VIEWER"
This is the classic Auth0 misconfiguration. Walk through the checks in order:
-
Is the Post-Login Action attached to the Login flow? Open Actions → Flows → Login and confirm the Action is on the canvas between Start and Complete. Deploying the Action in the library is not enough — it must be dragged onto the flow.
-
Does
roleClaimPathexactly matchnamespace + "/roles"? With the default Action snippet, that string ishttps://gluesync.com/roles. Any difference — including a trailing slash on the namespace — breaks the lookup. -
Is the role assigned to the user? In User Management → Users → the user → Roles tab, confirm the expected role is listed.
-
Does the role name match a
roleMappingskey? Auth0 role names are case-insensitively matched, but the entire string must match.managerwill not match a mapping key ofauth0-manager. -
Does the access token contain the claim? Use Actions → Library → your Action → Test. The output preview should include
https://gluesync.com/rolesin theid_token(and access token if requested). If it does not, the Action’sevent.authorization.rolesis empty — usually because the user has no roles assigned.
|
Auth0 only emits namespaced custom claims inside the ID token (and access token when explicitly requested by the Action), not on the |
Failed to exchange authorization code
-
Check the Client Secret in CoreHub matches the Client Secret in Auth0 Settings.
-
Confirm the Allowed Callback URLs in Auth0 contains the exact redirect URI shown in CoreHub (including scheme, host, port, and
/oidc/callback).
Invalid or expired OIDC state
-
Clear the browser’s cookies for the Gluesync domain and retry. States expire after 10 minutes.
-
Do not open multiple login tabs simultaneously.
Stuck on an Auth0 error page after Logout
-
Cause: Allowed Logout URLs does not include the exact URI CoreHub sends as
post_logout_redirect_uri. -
Solution: Add
https://gluesync.example.com/ui/v2/loginto Allowed Logout URLs and save the application. Origin-only (https://gluesync.example.com) is not sufficient. Gluesync does not take a custom Signout URL.
For more general troubleshooting, see the troubleshooting section of the main OIDC page.