Skip to content

feat: add support for GitHub OAuth authentication URLs#616

Open
sreekanthputta wants to merge 1 commit intoNoovolari:masterfrom
sreekanthputta:add-github-oauth-support
Open

feat: add support for GitHub OAuth authentication URLs#616
sreekanthputta wants to merge 1 commit intoNoovolari:masterfrom
sreekanthputta:add-github-oauth-support

Conversation

@sreekanthputta
Copy link

@sreekanthputta sreekanthputta commented Feb 26, 2026

This PR adds support for SAML authentication flows that use GitHub OAuth for authentication.

The Problem

I was trying to use Leapp with a SAML provider that uses GitHub Enterprise for authentication. When I clicked "Start" on my session, Leapp would immediately show an error:

SAML authentication timeout exceeded

The browser window never opened, and the session failed after just 5 seconds.

Why This Happened

Here's what was going on:

  1. My SAML provider redirects to GitHub OAuth for authentication (like https://github.example.com/login/oauth/authorize)
  2. Leapp monitors URL redirects during authentication and has a list of recognized authentication services (Okta, OneLogin, Google, etc.)
  3. When Leapp sees an unrecognized URL, it assumes something went wrong and times out after 5 seconds
  4. GitHub OAuth URLs weren't in the recognized list, so Leapp timed out before I could authenticate

The Fix

I added GitHub OAuth URLs to the list of recognized authentication services:

/^https:\/\/github\..+\/login\/oauth\/authorize.*/

This pattern works with any GitHub instance:

  • Public GitHub (github.com)
  • GitHub Enterprise (github.enterprise.com)
  • Custom GitHub Enterprise domains

Now when Leapp encounters a GitHub OAuth redirect, it recognizes it as a valid authentication step and waits for you to complete the login instead of timing out.

Testing

Before: Session failed with timeout error, browser never opened
After: Browser opens, I can log in with GitHub, and the SAML flow completes successfully

This should work for anyone using GitHub (public or Enterprise) as part of their AWS SAML authentication flow.

@sreekanthputta sreekanthputta force-pushed the add-github-oauth-support branch 3 times, most recently from fed16f6 to bd26926 Compare February 27, 2026 00:39
Add GitHub OAuth URL pattern to support SAML authentication flows that
use GitHub Enterprise or GitHub.com for OAuth authentication before
redirecting to AWS SAML endpoint.

This enables Leapp to work with identity providers that use GitHub as
an authentication layer (e.g., GitHub Enterprise SAML IdP).

Pattern /^https:\/\/github\..+\/login\/oauth\/authorize.*/ matches:
- https://github.com/login/oauth/authorize
- https://github.enterprise.com/login/oauth/authorize
- https://github.example.com/login/oauth/authorize
- Any GitHub instance domain

Tests added to verify the pattern works with any domain format.
@sreekanthputta sreekanthputta force-pushed the add-github-oauth-support branch from bd26926 to 9216956 Compare February 27, 2026 00:40
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@sreekanthputta
Copy link
Author

Sonarqube issues are not due to this PR. Although I can fix them in this PR if suggested to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant