Skip to content

fix: Link OAuth provider form to provider app setup pages - #1190

Merged
tofarr merged 3 commits into
mainfrom
feat/auth-provider-setup-links
Nov 5, 2026
Merged

tofarr merged 3 commits into
mainfrom
feat/auth-provider-setup-links

Conversation

@tofarr

@tofarr tofarr commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

HUMAN:

  • A human has tested these changes.

Tested links in localhost - it makes things much better.

AGENT:


Why

Setting up the external OAuth app (client ID, secret, callback URL) for a provider is the painful part of configuring a login/git provider, and finding the right settings page in GitHub, GitLab, etc. is hard. The superadmin provider form already shows the Redirect URL to copy, but gives no pointer to where it goes. This adds a little direction, not full automation.

Summary

  • Under the Redirect URL field of an OAuth provider row, show a one-line hint plus links to the provider's own OAuth app pages (new auth-provider-setup-links.ts).
  • Every link names the external service and ends with an external-link icon, e.g. "Create an OAuth app on GitHub ↗" / "View your OAuth apps on GitHub ↗". Links open in a new tab, and hovering shows the full destination URL.
  • GitHub: create (/settings/applications/new) and list (/settings/developers). GitLab: user and admin application lists. Forgejo: user applications. Bitbucket Cloud / Data Center: Atlassian docs. Azure DevOps: Microsoft Entra app registrations plus Microsoft Learn docs. Enterprise SSO: none.
  • The host follows the URLs entered in the form: the authorization URL, else the token URL (userinfo is skipped because it is api.github.com on github.com). GitHub Enterprise Server and self-managed GitLab therefore link to their own host, and links update as you type. Placeholder hosts (YOUR_*, PLACEHOLDER) fall back to the brand default, or no link.
  • No prefilled links and no per-provider instructions, to keep scope small.

Issue Number

How to Test

  1. cd frontend && npm install && npx vitest run __tests__/components/features/super-admin/auth-provider-setup-links.test.ts __tests__/components/features/super-admin/super-admin-auth-provider-edit.test.tsx
  2. In the UI (Super Admin > Auth providers), add or edit a GitHub provider: the links appear under the Redirect URL and open in a new tab. Change the Brand dropdown and the Authorization URL (e.g. https://ghe.example.com/login/oauth/authorize) and confirm the links follow (each should read "... on " with an external-link icon).

Automated checks (tests, typecheck, eslint, pre-commit) pass. I did not exercise it in a running browser.

Video/Screenshots

Screen.Recording.2026-11-05.at.7.53.30.AM.mov

Type

  • Bug fix
  • Feature
  • Refactor
  • Breaking change
  • Docs / chore

Notes

  • Not verified against the live providers while logged in: the Entra portal link and the GitLab admin link (/admin/applications). Other paths redirect to login when unauthenticated, which confirms they exist.
  • The GitHub link targets OAuth Apps, not GitHub Apps (/settings/installations only lists installed apps).
  • New i18n strings are English copies in every locale, like neighbouring keys. translation.json also shows one incidental reformatted line from rewriting the file.
  • Jira is not covered; it is not a brand in this form.

This PR was created by an AI agent (OpenHands) on behalf of the user.

@tofarr can click here to continue refining the PR


Enterprise server image for this PR:

ghcr.io/openhands/enterprise-server:sha-51ab363

Co-authored-by: openhands <openhands@all-hands.dev>
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Coverage report

This PR does not seem to contain any modification to coverable code.

@tofarr
tofarr marked this pull request as ready for review November 5, 2026 07:55
@tofarr tofarr changed the title Link OAuth provider form to provider app setup pages fix: Link OAuth provider form to provider app setup pages Nov 5, 2026
@github-actions github-actions Bot added the type: fix A bug fix label Nov 5, 2026

@hieptl hieptl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! 🙏

…con on provider setup links

Derive the provider host from the authorization or token URL.

Co-authored-by: openhands <openhands@all-hands.dev>
@tofarr
tofarr merged commit 5e29afe into main Nov 5, 2026
24 checks passed
@tofarr
tofarr deleted the feat/auth-provider-setup-links branch November 5, 2026 11:25
@openhands-release-bot openhands-release-bot Bot added the released: 1.87.0 Shipped in 1.87.0 label Nov 5, 2026
@openhands-release-bot

Copy link
Copy Markdown
Contributor

🚀 Released in 1.87.0.

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

Labels

released: 1.87.0 Shipped in 1.87.0 type: fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants