Maor Bar
03/23/2026, 2:00 PMDevRev
03/23/2026, 2:00 PMsdk.oauth.start('github', redirectUrl) returning Google's client_id instead of GitHub's suggests a provider configuration problem in your Descope project.
Troubleshooting Steps
1. Verify your GitHub OAuth provider configuration in the Descope console:
- Go to Social Login (OAuth / OIDC)
- Select GitHub → "Use my own account"
- Confirm the Client ID and Client Secret are correctly set for GitHub
2. Check if you have multiple OAuth providers configured and ensure GitHub is properly enabled for API/SDK access
3. Try using the specific provider method:
await sdk.oauth.start.github(redirectUrl, loginOptions);
JWT Missing Claims After Manual OAuth
The missing user claims (name, email, loginIds) in your JWT after sdk.oauth.exchange() is likely due to scope configuration. When using the SDK directly, you need to ensure proper scopes are requested.
Solution Steps
1. Include the required scopes in your OAuth start call:
const loginOptions = {
customClaims: {
// Add any custom claims needed
}
};
await sdk.oauth.start('github', redirectUrl, loginOptions);
2. For enriched JWT tokens with user profile data, you may need to configure custom claims in your Descope flows. The descope.custom_claims scope gives access to custom claims that can be set via flow actions
3. Consider using a Custom Claims action in your authentication flow to populate the JWT with user profile information like name and email
The SignInFlow widget likely works because it automatically handles scope configuration and custom claims population through the configured flow, while the direct SDK approach requires explicit configuration.
Custom GitHub Apps | Descope Documentation
Custom OAuth Providers Overview | Descope Documentation
OIDC Federated Applications Overview | Descope Documentation
Add User Information to JWT Response Using Descope Flows