Repository navigation
Follow the SDKs' BFF contract, use the latest SDK, and add E2E suites - #39
Open
brionmario wants to merge 1 commit into
Open
brionmario wants to merge 1 commit into
brionmario wants to merge 1 commit into
Conversation
This was referenced Nov 27, 2026
brionmario
force-pushed
the
bff-contract-sdk
branch
from
November 27, 2026 20:09
29072ca to
2bccef7
Compare
brionmario
marked this pull request as ready for review
November 27, 2026 20:09
brionmario
force-pushed
the
bff-contract-sdk
branch
from
November 28, 2026 05:37
2bccef7 to
f1d8dd5
Compare
brionmario
force-pushed
the
bff-contract-sdk
branch
2 times, most recently
from
November 28, 2026 05:47
8f20a2d to
9a5f157
Compare
This was referenced Nov 28, 2026
brionmario
force-pushed
the
bff-contract-sdk
branch
from
November 28, 2026 07:38
9a5f157 to
299faf6
Compare
brionmario
force-pushed
the
bff-contract-sdk
branch
from
November 28, 2026 17:36
299faf6 to
6d06138
Compare
10 of 11 tasks
The Node.js SDKs now follow the BFF contract of RFC 10017 (thunder-id/thunderid#7095): the Next.js and Nuxt session cookie is encrypted with THUNDERID_SESSION_SECRET, which must be at least 32 bytes in production, and @thunderid/express serves the whole contract with thunderIDBff(). - Every sample depends on its @ThunderID packages as "latest", so it always shows the current SDK. The lockfiles resolve the current releases. - AGENTS.md states the rule for every package manager: samples use the latest SDK release, and carry no compatibility with older ones. - The Next.js quickstarts and the Wayfinder sample set THUNDERID_SESSION_SECRET only, and the quickstart's config check requires it. - The Nuxt quickstart states the 32-byte minimum. - bff-react-express replaces its hand-written endpoints and proxy with thunderIDBff(), and documents the request rules and the opt-in token endpoint. - tests/e2e holds a dedicated end-to-end suite for every sample, at tests/e2e/<area>/<sample>-e2e: Playwright for the web and server samples, Maestro for the mobile ones. They share one server setup, client import and set of page objects in tests/e2e/shared, and run the sample with its published SDK. The quickstart suites are ported from the SDK repositories; the others are new. - The E2E workflow runs a web suite on a pull request when its sample, its suite or the shared setup changes, against the latest ThunderID release. Suites whose sample needs more than that release offers carry a ci-skip file; the B2B suites do for now. Mobile suites are not in CI yet; the iOS, Flutter and app-auth-flutter ones pass locally on a simulator. Signed-off-by: Brion <info@brionmario.com>
brionmario
force-pushed
the
bff-contract-sdk
branch
from
November 29, 2026 17:45
6d06138 to
3fb08b6
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.
Purpose
The Node.js SDKs now follow the BFF contract of RFC 10017 (thunder-id/thunderid#7095):
THUNDERID_SESSION_SECRET, which must be at least 32 bytes in production.@thunderid/expressserves the whole contract withthunderIDBff().This updates the samples to match, moves every sample to the latest SDK release, and adds a dedicated end-to-end suite for every sample.
Approach
Latest SDK in every sample
@thunderid/*dependencies arelatestinstead of a pinned version, so the samples always show the current SDK.@thunderid/react1.29.0,@thunderid/nextjs1.25.0,@thunderid/express1.22.0 and@thunderid/nuxt1.25.0.AGENTS.mdgains an SDK versions section that states this for each package manager and gives the steps for moving the samples after a release.BFF contract
quickstart-nextjs,quickstart-nextjs-b2b,wayfinder-enterprise-nextjs:THUNDERID_SESSION_SECRETonly.quickstart-nuxt: states the 32-byte minimum.bff-react-express:lib/proxy.mjswiththunderIDBff({apiBaseUrl, exposeAccessToken: true})./tokenstays on because the Token debug page uses it. A comment marks it as the optional token-mediating pattern./switchand back-channel logout, and says HTTPS is needed in production, since the cookie isSecurewith the__Host-prefix there.E2E suites (
tests/e2e)tests/e2e/<area>/<sample>-e2e:webServer, with the sample's own lockfile and so its published SDK, and passes the app's config as environment variables.run-e2e.shper app.tests/e2e/shared): server start and admin token, the import of every sample's OAuth client, test users, and the common page objects..github/workflows/e2e.yml): runs a web suite on a pull request when its sample, its suite or the shared setup changes, against a fresh server of the latest ThunderID release.ci-skipfile with the reason. The three B2B suites have one for now, because the latest release rejects their samples' configuration.Test results
ci-skip.Format check, lint and build pass in every sample.
Related Issues
Related PRs
@thunderid/express1.22.0,@thunderid/nextjs1.25.0 and@thunderid/nuxt1.25.0.__Host-Http-prefix. Thebff-react-expressREADME already describes it.AGENTS.mdnow say samples use the latest release, linking to the SDK versions section added here. Merge this pull request first.Checklist
tests/e2e/README.mdandAGENTS.md.)tests/e2e.)