Repository navigation
feat: add school-scoped learner saml single sign-on - #879
Merged
Merged
Conversation
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
clbotdev
force-pushed
the
feat/learner-sso
branch
from
November 14, 2026 07:47
533a791 to
7f62406
Compare
Schools on a plan with the learner_sso feature (every school in oss mode) can let learners sign in through their own SAML identity provider. - api: SP-initiated SAML with a signed assertion, RSA-SHA256, a stable subject, replay protection and audited failures; connections move through draft, active, suspended and disabled, and a change to what a connection trusts sends it back to draft to be tested again - api: email domains are verified by DNS TXT and rechecked weekly; schools can require SSO for their domains; turning a method off ends its sessions - admin: login providers settings, SSO connection setup with a test sign-in and hints for common provider mistakes - storefront: "Sign in with <label>" on the sign-in and checkout forms - uses @codelitdev/platform and @codelitdev/billing 0.11.0 for domain verification and plan features - docs: self-hosting SSO guide and learner sign-in notes; a project skill to browser-test against Keycloak
clbotdev
force-pushed
the
feat/learner-sso
branch
from
November 14, 2026 08:21
7f62406 to
3c9f280
Compare
s3rot0n1n
self-requested a review
November 14, 2026 08:37
s3rot0n1n
approved these changes
Nov 14, 2026
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.
Lets a school's learners sign in to its storefront through the school's own SAML identity provider (Okta, Entra ID, Google Workspace, Keycloak and similar). SSO is for learners only. It never signs anyone in to the admin or to CourseLit as a platform.
What's in it
API
signature_invalid,wrong_audience,unstable_subject, ...), and the admin shows a hint for it._courselit-verification.<domain>and rechecked weekly by the worker. After three failed checks in a row, the domain becomes unverified and the owner gets an email.SessionNotOnOrAfter.learner_ssoplan feature, throughbilling.hasFeature(always on inossmode). Login-methods settings are reachable over REST and MCP. The MCP tool is high-impact and needs confirmation.Admin: Settings → Login providers (email codes, Google, SSO), and an SSO connection page with:
Storefront: a "Sign in with " button on the sign-in and checkout forms. Addresses on domains that require SSO are sent to the button.
Dependencies:
@codelitdev/platformand@codelitdev/billing0.11.0 (codelitdev/platform#37), for shared domain verification and plan features. The SAML libraries (@node-saml/node-saml,xml-crypto,@xmldom/xmldom) are pinned exactly, with overrides, and have their own Dependabot group.Docs:
frontlit/docs/self-hosting/single-sign-on.md;BILLING_MODEnote;docs/wip/rewrite-sso-implementation.md;.claude/skills/test-sso-with-keycloak, to browser-test against a real Keycloak.The migration change rewrites the baseline, so reset the database after pulling.
Testing
lib/sso; storefrontlib/login-methods. Admin has 121 tests passing. The workspace type-check passes..envthat has Google keys: 578 of 582 passed.ui-surface.test.ts, already fails onplatform-based-rewrite: it readssection-authoring.tsx, which2c77a4b9deleted./dashboard, using the same identity again on the next sign-in;