Introduction
TIB supports OAuth 2.0-based social identity providers usingSocialProvider. Each supported provider requires an OAuth application registered with that provider, from which you obtain a Client ID and Client Secret.
The following provider names are supported in UseProviders[].Name:
| Provider | Name value |
|---|---|
| GitHub | github |
linkedin | |
| Twitter / X | twitter |
| Bitbucket | bitbucket |
| DigitalOcean | digitalocean |
| Dropbox | dropbox |
| Salesforce | salesforce |
The legacy
gplus provider for Google no longer works following the Google+ shutdown in 2019. Use the openid-connect provider name instead, as shown in the Google example below.ActionType, ReturnURL, and IdentityHandlerConfig fields required for your use case.
TIB Profile
The social provider configuration goes in theProviderConfig block of the TIB profile. Set ProviderName to SocialProvider and Type to redirect.
| Field | Description |
|---|---|
CallbackBaseURL | The base URL of your TIB instance. TIB appends the callback path automatically. |
FailureRedirect | URL to redirect the user to on authentication failure. |
UseProviders.Name | The provider name (for example, github, linkedin). See the table above. |
UseProviders.Key | The OAuth Client ID from your social provider application. |
UseProviders.Secret | The OAuth Client Secret from your social provider application. |
Domain Constraint
For providers that return the user’s email address (such as Google), you can restrict access to users from a specific email domain by adding aProviderConstraints block to the profile:
FailureRedirect.
JSON Web Encryption (JWE)
SocialProvider supports JSON Web Encryption (JWE), which allows TIB to decrypt encrypted ID tokens returned by the IdP. This is useful when your IdP is configured to encrypt tokens for additional security.
JWE requires Tyk Identity Broker v1.6.1+ and Tyk Dashboard v5.7.0+.
To enable JWE, add a JWE block to ProviderConfig:
| Field | Description |
|---|---|
Enabled | Set to true to enable JWE decryption. |
PrivateKeyLocation | For embedded TIB in Tyk Dashboard, use the certificate ID from the Tyk Dashboard certificate manager. For standalone TIB, use the file path to a PEM file containing the private key. |
Configure Your Provider
Register an OAuth application with your chosen social provider and note the Client ID and Client Secret. The callback URL to register with the provider is shown below. The{profile-id} in the registered URL must exactly match the ID in your TIB profile; a mismatch will result in a 400 Bad Request error:
github-dashboard and TIB running at http://dashboard.example.com:3000:
Worked Example: GitHub
This example configures GitHub OAuth for Dashboard SSO. The same pattern applies to all other social providers; only theName, Key, Secret, and the callback URL registered with the provider differ.
- Dashboard SSO
- Portal SSO
In this example, Tyk Dashboard is running at Note the Client ID and Client Secret.Tyk Dashboard configurationWith this configuration, registered users (with a Tyk Dashboard user account) get their own permissions; unregistered users fall back to the group specified in In production, present this as a “Log in with GitHub” button or link on a custom login page, rather than expecting users to navigate to it directly.See Dashboard SSO for details on session behavior, permissions, and user group mapping.
http://dashboard.example.com on port 3000; replace the example values with your own.GitHub OAuth applicationRegister an OAuth application at github.com/settings/applications/new. Set the Authorization callback URL to:sso_default_group_id. See Dashboard SSO for full details.TIB profileThe TIB profile is created via the Tyk Identity Broker API or the Tyk Dashboard UI.- set
Keyto the GitHub Client ID - set
Secretto the GitHub Client Secret - set
DashboardCredentialto the TIB service account’s Dashboard credentials
Worked Example: Google
Google authentication uses theopenid-connect provider name rather than a named OAuth provider, since the gplus provider was retired in 2019. The setup follows the same pattern as any OIDC provider.
Configure Google
- Go to the Google Cloud Console and navigate to APIs and Services > Credentials.
- Click Create Credentials and select OAuth client ID.
- Select Web application as the application type.
- Under Authorized redirect URIs, add the TIB callback URL:
- Click Create and note the Client ID and Client Secret.
Worked Examples (Google)
These examples use embedded TIB, so theCallbackBaseURL is the same as the Dashboard or Portal respectively; TIB handles requests on the same host and port.
- Dashboard SSO
- Portal SSO
In this example, Tyk Dashboard is running at With this configuration, registered users (with a Tyk Dashboard user account) get their own permissions; unregistered users fall back to the group specified in Login URLThis URL initiates the SSO login flow:In production, present this as a “Log in with Google” button or link on a custom login page, rather than expecting users to navigate to it directly.See Dashboard SSO for details on session behavior, permissions, and user group mapping.
http://dashboard.example.com on port 3000; replace the example values with your own.Tyk Dashboard configurationsso_default_group_id. See Dashboard SSO for full details.TIB profileThe TIB profile is created via the Tyk Identity Broker API or the Tyk Dashboard UI.- set
Keyto the Google Client ID - set
Secretto the Google Client Secret - set
DashboardCredentialto the TIB service account’s Dashboard credentials
ID in the registered URL must exactly match the ID in your TIB profile; a mismatch will result in a 400 Bad Request error: