diff --git a/dashboard/e2e/hybrid.spec.ts b/dashboard/e2e/hybrid.spec.ts
index b60d61c0..7f0e310a 100644
--- a/dashboard/e2e/hybrid.spec.ts
+++ b/dashboard/e2e/hybrid.spec.ts
@@ -56,7 +56,7 @@ function status(s: State) {
{ id: "slack_notifications", name: "Slack and Teams notifications", mode: "direct", through_coderhelm: "", stays_with_you: "", uses_coderhelm: false },
{ id: "mcp_apps", name: "Figma, Linear, Sentry, Sanity and other sign-in apps", mode: "direct", through_coderhelm: "", stays_with_you: "", uses_coderhelm: false },
{ id: "slack_commands", name: "Slack and Teams commands", mode: "unavailable", through_coderhelm: "", stays_with_you: "", reason: "CoderHelm has no shared Slack or Teams app: each team connects its own app's signing secret in Plugins settings, so there is nothing to relay. That keeps working the same way on a hybrid install.", uses_coderhelm: false },
- { id: "github_sign_in", name: "Sign in with GitHub", mode: "unavailable", through_coderhelm: "", stays_with_you: "", reason: "Signing people in to your install with GitHub needs your own GitHub App: a hosted app's sign-in would hand CoderHelm your people's identities. Use email sign-in, or Google with your own domain.", uses_coderhelm: false },
+ { id: "github_sign_in", name: "Sign in with GitHub", mode: "included", through_coderhelm: "Without a GitHub OAuth client of your own, GitHub's sign-in page is CoderHelm's GitHub App: CoderHelm passes GitHub's one-time code to your install, exchanges it when your install asks (with a secret only your install holds), and revokes the token at GitHub seconds later. It stores neither and doesn't ask GitHub who signed in.", stays_with_you: "Who signs in: your install asks GitHub itself whose account it is, then applies its own rules (team members and invites, two-factor). CoderHelm can't start a session on your install or choose who signs in.", reason: "", uses_coderhelm: false },
],
sharing: s.sharing,
checks,
@@ -319,7 +319,15 @@ test("other apps: each choice sends only that tool; direct and unavailable say s
await expect(page.getByTestId("hybrid-integration-slack_notifications")).toContainText("Works from your install, no app needed");
await expect(page.getByTestId("hybrid-integration-mcp_apps")).toContainText("Works from your install, no app needed");
await expect(page.getByTestId("hybrid-integration-slack_commands")).toContainText("Not available");
- await expect(page.getByTestId("hybrid-integration-github_sign_in")).toContainText("needs your own GitHub App");
+ // Sign in with GitHub works through Coderhelm's app: on, nothing to choose,
+ // and the card says the install decides who signs in.
+ const signIn = page.getByTestId("hybrid-integration-github_sign_in");
+ await expect(signIn).toHaveAttribute("data-mode", "included");
+ await expect(signIn).toContainText("On through Coderhelm's app");
+ await expect(signIn).toContainText("your install asks GitHub itself whose account it is");
+ await expect(signIn).not.toContainText("Google");
+ await expect(signIn).not.toContainText("Not available");
+ await expect(signIn.getByRole("button")).toHaveCount(0);
// GitHub has its own row above, so it isn't listed again.
await expect(page.getByTestId("hybrid-integration-github")).toHaveCount(0);
});
diff --git a/dashboard/e2e/sign-in-methods.spec.ts b/dashboard/e2e/sign-in-methods.spec.ts
index f72e7c3b..6c98a42d 100644
--- a/dashboard/e2e/sign-in-methods.spec.ts
+++ b/dashboard/e2e/sign-in-methods.spec.ts
@@ -1,10 +1,11 @@
import { expect, test, type Page, type Route } from "@playwright/test";
// The sign-in screen shows only the ways in that work on this deployment, as
-// the API's GET /auth/methods says. A self-hosted install on Coderhelm's
-// GitHub App (hybrid) has no GitHub OAuth client of its own, so it offers no
-// GitHub button: before this, the button sent people to GitHub with an empty
-// client_id and GitHub answered 404. Every API call is answered here.
+// the API's GET /auth/methods says. A self-hosted install offers GitHub with
+// an OAuth client of its own, or on Coderhelm's GitHub App (hybrid) once it is
+// registered: the same /auth/github then goes through Coderhelm's app and the
+// install checks the account itself. An install with neither shows no GitHub
+// button. Every API call is answered here.
type Methods = { password: boolean; google: boolean; github: boolean };
@@ -41,7 +42,7 @@ async function mockApi(page: Page, opts: { selfHosted: boolean; methods: Methods
const github = (page: Page) => page.getByRole("link", { name: "Continue with GitHub" });
const google = (page: Page) => page.getByRole("link", { name: "Continue with Google" });
-test("hybrid install with no GitHub client: email and password only, no GitHub button and no 'or'", async ({ page }) => {
+test("self-hosted install with no way to GitHub: email and password only, no GitHub button and no 'or'", async ({ page }) => {
const { calls } = await mockApi(page, { selfHosted: true, methods: { password: true, google: false, github: false } });
await page.goto("/");
await expect(page.getByLabel("Email")).toBeVisible();
@@ -62,6 +63,19 @@ test("self-hosted install with its own GitHub client: the GitHub button goes to
await expect(page.getByText("or", { exact: true })).toBeVisible();
});
+test("hybrid install registered with Coderhelm: GitHub is offered and starts at the install's own /auth/github", async ({ page }) => {
+ const { calls } = await mockApi(page, { selfHosted: true, methods: { password: true, google: false, github: true } });
+ await page.goto("/");
+ await expect.poll(() => calls.includes("/auth/methods")).toBe(true);
+ await expect(github(page)).toBeVisible();
+ // The install's API starts the trip (it then goes through Coderhelm's app),
+ // never a Coderhelm address in the page itself.
+ await expect(github(page)).toHaveAttribute("href", "/auth/github");
+ await expect(github(page)).not.toHaveAttribute("href", /coderhelm\.com/);
+ await expect(google(page)).toHaveCount(0);
+ await expect(page.getByLabel("Email")).toBeVisible();
+});
+
test("self-hosted install whose API has no method list yet: no GitHub button", async ({ page }) => {
await mockApi(page, { selfHosted: true, methods: "missing" });
await page.goto("/");
diff --git a/dashboard/src/components/hybrid-section.tsx b/dashboard/src/components/hybrid-section.tsx
index fc5634df..d14ae775 100644
--- a/dashboard/src/components/hybrid-section.tsx
+++ b/dashboard/src/components/hybrid-section.tsx
@@ -666,15 +666,17 @@ function IntegrationItem({ i, hybrid, s }: { i: HybridIntegration } & RowProps)
/>
) : i.mode === "direct" ? (
Use your own {i.name} app for now.
} - {i.mode === "hosted" && !notOffered && (i.through_coderhelm || i.stays_with_you) && ( + {(i.mode === "hosted" || i.mode === "included") && !notOffered && (i.through_coderhelm || i.stays_with_you) && (