Repository navigation
Add the remaining playgrounds, fix the SDK issues they surfaced, and move the Better Auth sample - #127
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔀 Cross-SDK feature parity, no ports neededThis pull request is labelled |
This was referenced Oct 21, 2026
Merged
brionmario
force-pushed
the
remove-better-auth-sample
branch
3 times, most recently
from
October 21, 2026 09:34
c2128e5 to
4b6b168
Compare
…move the Better Auth sample Add playgrounds for Vue, Next.js, Nuxt, Browser and Node.js next to React and Express, so every JavaScript SDK can be exercised from source. Every playground header now shows the ThunderID logo next to the playground's technology instead of an SDK switcher. Fix the SDK issues the playgrounds surfaced: generate the authorization state from random bytes and check it on the code exchange, validate the discovered issuer, load discovery on demand, report OAuth error responses readably, fail clearly when there is no session, refresh expired sessions in protect(), stop handleSignIn() from calling next() after redirecting, count session expiry in seconds, keep every on() subscriber and fire the HTTP request hooks consistently, fix the route matcher's (.*) patterns, the Vue route guard context, Nuxt's scope and organization checks, scope merging and dependency pre-bundling, field label associations in React, unhandled sign-in errors, and listener and typing issues across the packages. The Better Auth Next.js integration sample now lives in thunder-id/samples as integrations/better-auth-nextjs and depends on the published @thunderid/better-auth. With it gone, samples/ is empty, so the workspace glob, the ESLint copyright exemption, the PR builder's samples filters and the pack-sample action go too. Update vite and launch-editor for GHSA-587h-7wmj-h5pm, which fails the Security Audit job: vite 6.4.4 and 7.3.7 and launch-editor 2.14.2 through a refresh, and vite 8 pinned to 8.2.4, which pnpm otherwise keeps at 8.2.1 for vitest's peer range. Refs thunder-id/thunderid#5904 Refs thunder-id/thunderid#5919 Signed-off-by: Brion <info@brionmario.com>
brionmario
force-pushed
the
remove-better-auth-sample
branch
from
October 21, 2026 10:12
4b6b168 to
cd28cec
Compare
DonOmalVindula
approved these changes
Oct 21, 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
Removes the Better Auth Next.js integration sample now that it lives in thunder-id/samples, as
integrations/better-auth-nextjs, moved in thunder-id/samples#11 (thunder-id/thunderid#5904). It was the last sample left here after #126 moved the quickstarts, sosamples/is now empty.Approach
samples/integrations/better-auth/nextjs.pnpm-workspace.yamlno longer includessamples/integrations/*/*, and the lockfile drops its importer. Thesharpoverride's justification now names the packages that still reach it (packages/nextjs and packages/better-auth vianext).samples/**is gone, and the PR builder's lint and test steps drop their!./samples/**filters.@thunderid/better-authreleases no longer attach a sample zip, since the samples repository releases the sample now. Thepack-sampleaction, which only that step used, is removed.AGENTS.md: describes the samples living in thunder-id/samples.VITE_PLAYGROUND_EXPRESS_URLgo too, since the playgrounds are independent.fs.existsSync()check bypassable on Windows): this advisory currently fails the Security Audit job onmaintoo. vite 6.4.4 and 7.3.7 and launch-editor 2.14.2 come in through a lockfile refresh, and the React playground's vite floor moves to^6.4.4. The vite 8 line, which pnpm auto-installs forvitest's peer range and keeps at the locked 8.2.1 throughpnpm updateandpnpm dedupe, is pinned tovite@8: 8.2.4inpnpm-workspace.yamlwith a justification. Beyond these packages, the only lockfile version changes arerolldown1.2.14 and@oxc-project/types, which vite 8.2.4 requires. This replaces Update vite and launch-editor for the launch-editor advisory #128.Verified locally:
pnpm install --frozen-lockfile,pnpm audit --audit-level=high(only the advisories the workspace already ignores remain),pnpm build(13/13),pnpm format:check, and lint and test for every non-package workspace. Both edited workflows parse.SDK fixes
The playgrounds surfaced bugs across the packages. Each fix has a unit test that fails without it.
@thunderid/javascript:endpoints.issueror the base URL, tolerating a trailing slash. A mismatch fails withJS-AUTH_CORE-GOPMD-IV03.getDiscoveryResponse()andgetOpenIDProviderEndpoints()load discovery on demand.erroranderror_descriptioninstead of[object Object].getUser()andgetDecodedIdToken()fail with documented codes instead of crashing, andexchangeToken()only decodes the ID token when its template needs it.getConfiguration()is typed as a Promise, and the SDK no longer toucheslocalStorageunder Node.jose: imported by subpath, so Next.js middleware no longer bundles its JWE code.@thunderid/nodeand@thunderid/express:protect(): expired sessions with a refresh token are refreshed (one refresh in flight per session), and are cleared otherwise.handleSignIn(): no longer callsnext()after redirecting.@thunderid/browser:on()hooks:on()keeps every subscriber, the HTTP request hooks work when registered beforeinitialize(), andhttp-request-finishfires on success too.storagein the config type-checks without an explicit generic.createMediaQueryListener()returns adisconnect().getUserProfile(): implemented on top of the existing/users/mehelper.@thunderid/react: form fields associate their label and description (htmlFor,aria-describedby).<SignIn />without an application ID reports throughonErrorinstead of an unhandled rejection.ThemeProviderremoves its media-query listener.recoverandgetStorageManagerare typed.@thunderid/vue:createThunderIDGuard()finds the context under Vue Router.<SignIn>: no unhandled rejection.ThemeProvider: removes its listener.@thunderid/nextjs:createRouteMatcher: the documented(.*)patterns match.getFlowMetaAction: returns an error result instead of throwing.@thunderid/nuxt:requireScopesandrequireOrganizationread the session's scopes and organization.scopesreplaces the default instead of being appended, andbaseUrlis optional in the config type when the environment supplies it.<SignIn>: no unhandled rejection.Missing capabilities the playgrounds found remain listed as gaps in their READMEs. These include an organizations API, event subscriptions, server-side ID token access, and fully typed
user/signIn/signUp/signOutinuseThunderID(), which needs@thunderid/nextjs's context types reworked first. Adding them needs a specification change and work in every SDK, so they are not part of this PR.Playgrounds
Adds
playgrounds/vue,playgrounds/nextjs,playgrounds/nuxt,playgrounds/browserandplaygrounds/nodenext toreactandexpress, so every JavaScript SDK can be exercised from source (thunder-id/thunderid#5919). Each one uses its SDK throughworkspace:*and follows the playground designs:vue@thunderid/vuecomponents with Vue SFC snippets, composables and tokensnextjsthunderIDProxy,protectRoute, route handlers, server actions, back-channel logout), a component explorer, a Server page with an API explorer, and tokensnuxtuseServerSession,requireServerSession, route and server middleware), a component explorer, composables, and a Server page with the SSR context and an API explorerbrowserThunderIDBrowserClientwith a liveon()hook log, an explorer for the package's UI helpers (it ships no components), and tokensnodeThunderIDNodeClientmethod, with each HTTP exchange and an SDK traceEvery header reads: ThunderID logo, the technology's logo, then " Playground", with no switcher. The PR builder already covers the playgrounds through
pnpm build,pnpm format:check, and lint and test for non-package workspaces. The only new tooling dependency isvue-tsc, which type-checks.vuefiles for the Vue and Nuxt playgrounds. Each playground's README lists the SDK gaps it surfaced, such ascreateThunderIDGuardfailing to find its context under Vue Router, andcreateRouteMatchernot matching(.*)patterns. Nothing in this PR has been run with a signed-in session yet, since no application is configured on the local server they were checked against.Screenshots
Related Issues
Related PRs
Checklist
breaking changelabel added.parity/prs-raisedorparity/prs-not-neededadded.parity/prs-raised, the port links are posted as a reply on the parity check's comment.Security checks