Repository navigation
Add the React and Next.js B2B quickstarts - #27
Merged
Merged
Conversation
Each app lets a company sign up as its own organization, with the first account inside the company or shared into it, shows the organization and roles the tokens carry, switches between the companies an account belongs to, and lets a company admin plug in the company's identity provider. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: AnuradhaSK <anuradha199528@gmail.com>
AnuradhaSK
force-pushed
the
add-b2b-quickstarts
branch
from
November 12, 2026 19:32
a6881e3 to
e3aac39
Compare
brionmario
approved these changes
Nov 13, 2026
This was referenced Nov 13, 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.
Purpose
Adds two B2B quickstarts,
quickstarts/react-b2b(@thunderid/react) andquickstarts/nextjs-b2b(@thunderid/nextjs). They are the apps behind the new React and Next.js B2B quickstart pages in the ThunderID docs. Each company that signs up becomes its own organization unit (OU) in ThunderID.Both apps show the same five things:
ouId,ouHandle,ouName,rolesandscope.OrganizationUnitSwitcher.FlowVariablesForm. Employees then choose Sign in with enterprise SSO and enter the company's handle.Each quickstart ships a
thunderid-config/bundle that creates every resource it needs, with fixed IDs: the platform OU, user type, Admin and Member roles, sign-up and sign-in flows, and the application.This PR also registers both quickstarts in the repository:
banners.jsonentries.sample_quickstarts_react_b2bandsample_quickstarts_nextjs_b2binputs in the release workflow.The PR builder finds both through their
package.json, so they are built and linted without a workflow change.Screenshots
Taken against a local ThunderID server built from
main. In each app, a company was registered with My account belongs to this company.React B2B Quickstart (
https://localhost:5173)Next.js B2B Quickstart (
http://localhost:3000)Approach
Platform organization. Each quickstart's platform organization is a root OU in the Default project. Companies are created beneath it at sign-up. Only the Control Plane creates a root OU and writes server config, so the bundles are imported there.
Two import files. The Console tests an import before running it, and that test only finds OUs that already exist. So
organization-unit.yamlis imported on its own, beforethunderid-config.yaml.One sign-up flow for both kinds of account. An application binds a single registration flow, and its sign-in flow can call only that one (
APP-1039). Both kinds of sign-up therefore live in one flow, behind the Register your company choice screen.Roles and permissions. The shared
Adminrole grantsorg, which manages the organization the token names.Membergrants nothing. The admin's token carriesorg, and the app shows the Enterprise SSO section only when the token'sscopeincludes it.Each README has a production note.
orgmanages everything in a company, so production apps should grant it only to trusted admins, or route management calls through their own server, as the Wayfinder Enterprise sample does.How each app gets its token.
orgresourceon sign-in and on switchdefaultResourceServerserver config to the System resource server, because@thunderid/nextjs1.18.1 drops sign-in options in redirect mode@vitejs/plugin-basic-ssl), so a switch can reuse the ThunderID session in a hidden frameServer version. Both apps need a ThunderID server built from
main. They use features newer than 2.0.0-m1, such as theorgpermission.Related Issues
Related PRs
Checklist
quickstarts/react-b2b/README.md,quickstarts/nextjs-b2b/README.md)breaking changelabel added.Security checks
🤖 Generated with Claude Code