Skip to main content

🔐 Using ggLeap as an OpenID Connect (OIDC) Provider

ggLeap supports OpenID Connect (OIDC) to allow third-party applications to authenticate users using their ggLeap accounts. This enables integrations such as "Login with ggLeap" for partner applications, websites, or services.
OIDC is built on top of OAuth 2.0 and allows applications to securely verify user identity and obtain basic profile information.

🧠 Overview

By integrating with ggLeap's OIDC provider, applications can:

  • Allow users to sign in using their ggLeap account
  • Enable Single Sign-On (SSO) across supported apps
  • Retrieve user information such as email, profile, and group membership
  • Support center-specific authentication when needed
    Applications authenticate users through ggLeap and receive a token response that confirms identity and requested permissions.

🌐 OIDC Issuer Endpoints

Applications must use the appropriate issuer URL depending on the environment.

Environment Issuer URL
Production https://api.ggleap.com/production/oidc
Beta https://api.ggleap.com/beta/oidc
Production and Beta share the same data, so a single client works against both issuers. Use the Production issuer for your live application.
OIDC discovery metadata and public signing keys are automatically available under the issuer endpoint. Most OIDC libraries will retrieve this configuration automatically.

Note: The discovery endpoint does not support dynamic client registration. Client credentials cannot be self-issued and must be requested from ggCircuit (see below).

🔑 Required Integration Information

To integrate with ggLeap OIDC, the application developer will receive the following credentials:

Parameter Description
Client ID Unique identifier for the application
Client Secret Confidential key used during token exchange
Redirect URI(s) HTTPS callback URL(s) where ggLeap sends authentication responses
These values must be configured in the application's OIDC client settings.

📝 Requesting OIDC Credentials

Client IDs and Client Secrets are issued by ggCircuit. To get them, send one request to ggCircuit Support that includes all of the following:

Item Details
Application name The name of your app or website, as users will see it
Center name The name of your ggLeap center. If one app will serve a network of centers, list every center name
Scopes Which of email, profile, and group the app needs, and which of them are required (the user cannot deselect them). openid is always included and mandatory, so you do not need to list it
Redirect URI(s) HTTPS callback URL(s). Must match exactly what your app sends
Post-logout redirect URI(s) Where users land after logout. Leave out if your app does not use logout
Contact email Where we send the one-time credentials link
How to send the request
Send the request by email or through support chat. To protect your center, requests must come from the center's known email address on file with ggCircuit, so that we can confirm the request is authorized. Requests from unknown addresses will need to be verified before credentials are issued.
Example request

Application name: My Rewards Site
Center name: My Gaming Lounge
Scopes: email (required), profile (optional)
Redirect URI: https://example.com/auth/callback
Post-logout redirect URI: https://example.com/
Email for credentials link: admin@example.com
Once the request is processed, ggCircuit sends a one-time link to the contact email. The link can only be opened once, so copy the Client Secret into a secure location (such as a password manager or secrets vault) right away. If the link is lost or expired, contact support to have new credentials issued.
Test client (optional)
During development, you should not use your production redirect URL for testing. You can request a second, separate client for your own test or development environment, with its own test redirect URLs (for example, http://localhost:3000/auth/callback). A test client has its own Client ID and Client Secret. Mention in your request that you want a test client and include the test redirect URL(s).

🏢 Center-Bound and Network-Wide Clients

There are two types of OIDC clients, and which one you get depends on how your app will be used.
Center-bound client (most common)
The client is tied to one center, and the center is stored in the client settings. Your app does not need to send center_uuid in authorization requests, and you do not need to know your center's GUID. Just give us your center name in the credentials request.
Network-wide client
One client is shared across several centers, so users from any of those centers can sign in to the same app. Because the client is not tied to a single center, your app must include center_uuid={guid} in each authorization request, with the GUID of the center the user belongs to. Your app is responsible for determining which center that is, for example by asking the user to pick their center before redirecting to ggLeap. We can look up each center's GUID from its center name, so list every center name in your credentials request.

🔐 Authorization Request

Applications initiate login by sending users to the ggLeap authorization endpoint.
Endpoint
{issuer}/connect/authorize
Example Authorization Request

{issuer}/connect/authorize
?client_id={client_id}
&redirect_uri={encoded_redirect_uri}
&response_type=code
&scope=openid%20email%20profile
&state=abc
&nonce=xyz
[&center_uuid={guid}]

center_uuid is only needed for network-wide clients.
Parameters

Parameter Description
client_id Client ID issued for the application
redirect_uri Must match a registered redirect URL exactly
response_type Use code for authorization code flow
scope Requested permissions, separated by spaces (%20 when URL-encoded). Always include openid
state Optional application state value. Returned unchanged to your redirect URI
nonce Recommended security value. Returned inside the ID token
center_uuid Required only for network-wide clients. Identifies the center the user is signing in to. Not needed for center-bound clients

🧾 Available Scopes

Applications can request the following scopes during authentication.

Scope Description
openid Always included and mandatory for OIDC authentication. Cannot be deselected
email Provides the user's email address
profile Provides basic profile information
group Returns the user's ggLeap group information
Only request the scopes your application actually needs. Keep openid in the scope parameter of your authorization request, since OIDC libraries require it.

🔁 Token Exchange

After the user successfully signs in, ggLeap redirects the user back to the application with an authorization code.
The application then exchanges this code for tokens using the token endpoint.
Endpoint
{issuer}/connect/token
Standard OAuth Authorization Code Flow should be used for this step. Send the exchange request from your server (never from browser code), since it uses the Client Secret.

🚪 Logout (End Session)

Applications can sign users out of ggLeap sessions using the logout endpoint.
Endpoint
{issuer}/connect/logout
Parameters

Parameter Description
id_token_hint Token from the user's recent login session
post_logout_redirect_uri Optional redirect URL after logout. Must be registered with your client
If a valid redirect URI is provided and allowed, the user will be redirected after logout.

⚠️ Common Integration Issues

Issue Resolution
Redirect URI mismatch Ensure the redirect URI matches the registered URL exactly, including scheme, host, path, and trailing slash
Post-logout redirect not working Ensure the URL was included in your credentials request and matches exactly
Missing center_uuid Only network-wide clients must send it. If your client is network-wide, include the GUID of the user's center in every authorization request
Authentication fails Confirm the issuer URL, Client ID, and Client Secret are correct
Localhost or test URLs rejected Test redirect URLs need their own test client. Request one from support
Login not completing Ensure the application is using the authorization code flow
Missing user data in tokens Confirm the needed scope (email, profile, group) is both requested in the authorization request and approved for your client
Lost the Client Secret The credentials link is one-time use. Contact support to have new credentials issued

🧪 Basic Integration Test

To verify the integration is working:

  1. Construct an authorization request using your Client ID and Redirect URI.
  2. Open the URL in a browser.
  3. Sign in with a ggLeap account.
  4. Confirm the application receives an authorization code in the redirect URL.
  5. Exchange the code using the token endpoint.
    If successful, the application will receive access and identity tokens confirming the user's login.

Was this article helpful?

More in Single sign-on (SSO)

Not finding what you are looking for?

Chat with us or send us an email. Chat is open 24/7 through the bubble at the bottom right.

Send us an email