Repository navigation
Migrate multitenant example to Nx 23, React 19 and oidc-spa 10 - #39
Closed
Wictorgirardi wants to merge 14 commits into
Closed
Wictorgirardi wants to merge 14 commits into
Wictorgirardi wants to merge 14 commits into
Conversation
This was referenced Sep 24, 2026
Contributor
Author
|
Combined into #44 with the other SPA examples. The changes are the same; only the commit SHAs differ. |
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.
Depends on #28 for the shared workflows and the local Keycloak with its
orgsprofile. The branch includes that commit; the later commits are one step each.Summary
nx migrate 23.2.1and applied its migrations.migrations.jsonis removed, analytics are off, and Nx's deprecated Vite plugins are replaced with Vite 8's ownresolve.tsconfigPaths.package-lock.jsonfiles are gone. Node 24.baseUrl, noignoreDeprecations), Tailwind CSS 4 configured in CSS. The old Tailwind themes were empty, so thep2blueclasses never rendered.eslint-plugin-react, used by Nx's React config, doesn't support ESLint 10), and Prettier 3.@nx/vitest. Nx 23's Vitest plugin doesn't support Vitest 5 yet. The old specs couldn't pass; the new ones cover:Authorizationheader;src/oidc.tsin each app, which also ends the circular imports intomain.tsx.OidcInitializationGate..env(VITE_OIDC_ISSUER_URI,VITE_OIDC_CLIENT_ID) instead of the<CLIENT>/<REALM>placeholders in code.libs/api-manageris nowcreateOrgsApi({ issuerUri, getAccessToken }). It derives the base URL and realm from the issuer and asks oidc-spa for a fresh token on every request.await oidc.getTokens().accessTokenwould also have sentBearer undefinedwith oidc-spa 10.masterbranch, which now returns 404.openapitools.json, and generated code isn't hand-edited.multitenant.multitenant.yml.Test plan
From a clean install on Node 24:
pnpm install --frozen-lockfile && pnpm run typecheck && pnpm run lint && pnpm run test && pnpm run buildall pass: 5 projects, 5 tests, 2 app builds.End to end against the local Keycloak with
docker compose -f keycloak/docker-compose.yml --profile orgs up -d --wait, in dev and in production builds./orgs/mereturns 200:actionlint passes on the workflow.
Docs drift
blog/2024-11-11-multi-tenancy-with-organizations.md:*redirect URIs. The example defaults to the local Keycloak, where clients, users (jane/jacques) and organizations are preconfigured. Clients need PKCE andhttp://localhost:4200/*orhttp://localhost:4201/*.newyorkwith display name "New York"..env/.env.local.orgs.pngscreenshot shows the old UI.