Skip to content

Add native GitHub auth mode with default token flow and GitHub App support#1699

Draft
Copilot wants to merge 1 commit into
mainfrom
copilot/add-github-authentication-type
Draft

Add native GitHub auth mode with default token flow and GitHub App support#1699
Copilot wants to merge 1 commit into
mainfrom
copilot/add-github-authentication-type

Conversation

Copilot AI commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

This change adds a dedicated GitHub authentication type to the Infinity datasource, with token auth as the default and optional GitHub App-based auth. It replaces the prior guided GitHub setup with first-class config + backend handling for both flows.

  • Auth model and config surface

    • Added auth_method: "github" to frontend/backend auth enums.
    • Added GitHub-specific config payload (authType, appId, installationId, apiUrl) and secure fields (githubToken, githubAppPrivateKey).
  • UI changes (datasource config)

    • Added a new GitHub auth card in the main auth selector.
    • Introduced GitHub auth editor with:
      • Token auth (default): PAT input
      • GitHub App auth: App ID, Installation ID, API URL, private key
    • Removed GitHub from “Other Auth Providers” so GitHub is now configured through the primary auth path.
  • Backend auth behavior

    • Token mode now applies `Authorization: ****** via existing bearer header path.
    • App mode adds transport-level GitHub App token acquisition:
      • Signs app JWT with the configured private key
      • Calls POST /app/installations/{installation_id}/access_tokens
      • Caches/reuses installation tokens until near expiry
      • Injects bearer token per request
  • Validation and docs alignment

    • Added GitHub auth validation rules (token required for token mode; app credentials + private key required for app mode).
    • Updated GitHub example docs to use the new GitHub auth type and note App auth availability.
jsonData:
  auth_method: github
  github:
    authType: token   # default
  allowedHosts:
    - https://api.github.com
secureJsonData:
  githubToken: ${GITHUB_PAT}

Copilot AI changed the title Add GitHub authentication type with token and app support Add native GitHub auth mode with default token flow and GitHub App support Jun 5, 2026
Copilot AI requested a review from yesoreyeram June 5, 2026 06:30
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.

3 participants