Repository navigation
Hosted two-factor sign-in: Settings, Sign-in per team, held screen, Security, docs - #243
Merged
Merged
Conversation
nambok
force-pushed
the
feat/hosted-team-2fa
branch
2 times, most recently
from
October 27, 2026 17:13
1232319 to
5ea2887
Compare
…ecurity, docs Settings, Sign-in opens on hosted with the team's switch, how many people have no second factor, the email notice and a reset that reaches every team. The shell learns a held session from the server's two_factor_required answer, so sessions that aren't held make no extra call. Security shows the app code after Google or GitHub and keeps it on while a team requires it. New docs page Concepts, Sign-in and two-factor, and a card on the Security page.
nambok
force-pushed
the
feat/hosted-team-2fa
branch
from
October 27, 2026 18:11
5ea2887 to
d9ef6a0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The dashboard and docs for two-factor sign-in on hosted CoderHelm. Backend: CoderHelm/coderhelm-platform#332.
two_factor_requiredanswer: on the usage call it already makes at load, and on any later request. A session that isn't held makes no extra call (a test checks this). Self-hosted still asks up front, as before./concepts/sign-in/), for hosted;sign_inadded to the roles table;Changes
dashboard/src/app/settings/sign-in/page.tsx: hosted mode (no domains section, team wording, the without-a-second-factor line, the notified toast, reset wording).dashboard/src/components/settings-items.tsx: Sign-in is no longer self-host only.dashboard/src/components/client-shell.tsx: the held check on hosted comes fromtwo_factor_requiredanswers.TwoFactorGateuses the team's wording and treats any factor the person already has as "sign in again".dashboard/src/lib/api.ts:TWO_FACTOR_REQUIREDevent fromrequest;must_keeponMyTwoFactor;without_2faonSignInSettings;notifiedon the update answer.dashboard/src/app/settings/security/page.tsx: the hosted two-factor section and the cases above.dashboard/e2e/hosted-2fa.spec.ts(new): 9 tests at 1440 and 390. They cover the settings, the confirmation and its email count, the reset, the switch waiting for the admin's own code, the hub entry, the held screen and finishing setup from it, no extra call when not held, Security after Google (kept on, off, factor on the password account), and the code step after Google.docs/content/docs/concepts/sign-in.mdx(new),concepts/meta.json,concepts/roles.mdx,published-pages.json.src/content/site.ts: the Security page card.Verification
npm run typecheck,npm run lint,npm run check:openapi(matches the platform) andnpm run build: clean.hosted-2fa.spec.ts(18),sign-in-2fa.spec.ts,audit-shell.spec.ts,run-questions.spec.ts,settings-pages.spec.tsandsettings.spec.ts;selfhost.spec.ts"Setup: failing checks..." fails the same way onmain(3 check runs, expects 2), so this change didn't cause it. A layout test that timed out once passed on rerun.npm run lint(warnings only, none new) andnpm run build: clean.npm run test:unit(86 passed),npm run build,npm run typecheck,npm run check:links(5137 internal links, none broken) andnpm run check:output: clean.