Yuval Yacoby
03/30/2026, 1:11 PMDevRev
03/30/2026, 1:11 PM// Example flow input structure
{
"domain": "<http://github.company-a.com|github.company-a.com>",
"customData": {
"githubDomain": "<http://github.company-a.com|github.company-a.com>"
}
}
Implementation Steps
1. Set up custom OAuth providers for each GitHub Enterprise server in the Descope Console
2. Create a flow screen with a domain input field to capture the user's GitHub Enterprise server domain
3. Add conditional logic using a Condition block to check the domain value and route to the appropriate OAuth provider
Alternative Approach Using SDK
You can also handle this programmatically using the Management API to dynamically create OAuth providers:
// Create OAuth provider via Management API
const response = await descopeClient.management.oauth.create({
name: `GitHub-${domain}`,
clientId: customerOAuthId,
clientSecret: customerOAuthSecret,
authURL: `https://${domain}/login/oauth/authorize`,
tokenURL: `https://${domain}/login/oauth/access_token`
});
Flow Inputs for Dynamic Routing
Pass the domain as a flow input parameter to determine which OAuth provider to use . Flows can adapt based on context, device type, tenant, and custom parameters .
Tenant-Based Approach
Consider using tenants to organize customers by their GitHub Enterprise domains. Each tenant can have its own OAuth configuration, making management easier .
The conditional flow approach gives you the most flexibility while keeping the user experience smooth. Users enter their domain once, and the flow automatically routes them to the correct OAuth provider.
Customize OAuth Social Login | Descope Documentation
The Power of Descope Flows: Enforcing SSO for SSO-Enabled Domains
SSO Authentication | Descope Documentation
Choosing the Right Descope UI Integration OptionYuval Yacoby
03/30/2026, 1:13 PMDevRev
03/30/2026, 1:14 PMReuven Zabirov
03/30/2026, 2:12 PM