Repository navigation
bridge-react 1.0.0-alpha.1: the React plugin for the new Bridge, on auth-core 1.0 - #51
Open
iman-nebulr wants to merge 4 commits into
Open
iman-nebulr wants to merge 4 commits into
iman-nebulr wants to merge 4 commits into
Conversation
…932) The React counterpart of bridge-svelte 1.0.0-alpha.8 for the new Bridge: one setting (the issuer), every security step in auth-core 1.0.0-alpha.8, and the same pages, settings, copy (12 languages) and data attributes as svelte, so docs and tests map one to one. - BridgeProvider: makes the page's client, follows email links, guards every navigation with flag-only route rules and the paywall flag, and guards again when the session or flags change. Router-agnostic: it takes the app's router location and navigate, or the browser's history. - Hooks for session, user, workspace, workspaces, me, flags, billing, plans, usage, live status; resources refresh on Live notices. - Sign-in pages from one route (password, sign-in link, passkeys, hosted mode, hand-off, invites, workspaces, the wait message), the team panel, plan picker, subscription status, notices, upgrade dialog, bridgeFetch. - Storage 'local' (default) or 'memory', as svelte. - ESM only, React 18/19; 0.x sources, router subpaths and /flags removed. - Unit tests: core (guard, config, copy in 12 locales, link relay, storage, client against auth-core's fake issuer) and the provider's guard in jsdom under StrictMode. Refs: TBP-932 Claude-Session: https://claude.ai/code/session_01G1bV8Xv8bNjMNToHyYYCgW
…TBP-932) The svelte 1.0 demo and specs, ported: React Router around BridgeProvider (StrictMode), the same routes and rungs 0-4, and the same specs against auth-core's fake issuer over HTTP, or a real issuer with E2E_ISSUER. The app API is a Vite dev stand-in for the 402 at a plan limit; the server-helpers spec is dropped, as React has no server. Refs: TBP-932 Claude-Session: https://claude.ai/code/session_01G1bV8Xv8bNjMNToHyYYCgW
The svelte 1.0 guides, translated to the React package's real API, with a Svelte-to-React names table so the two map one to one. Refs: TBP-932 Claude-Session: https://claude.ai/code/session_01G1bV8Xv8bNjMNToHyYYCgW
PR gate, docs links, e2e guards and the install test run on PRs into v1; the install test builds the 1.0 package and checks it loads with React 18 and 19. No lockfile is tracked, as in bridge-svelte v1. Refs: TBP-932 Claude-Session: https://claude.ai/code/session_01G1bV8Xv8bNjMNToHyYYCgW
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.
The React counterpart of
@nebulr-group/bridge-svelte1.0.0-alpha.8, on@nebulr-group/bridge-auth-core1.0.0-alpha.8 (pinned exactly). One setting, the issuer. Every security step (tokens, PKCE, email links, hand-off, storage modes, revocation) stays in auth-core; this package is the React layer over it.v1is new: created frommain(7381a5e) for this line, as bridge-svelte's.lateststays on 0.x.What it has (svelte's public surface, React-idiomatic, same names, props, copy and data attributes)
<BridgeProvider config router>: the client, email links to their pages, flag-only route rules and the paywall flag, re-guarded on session and flag changes. Router-agnostic ({ location, navigate }from React Router, TanStack, Wouter; default the browser's history).useSession,useUser,useWorkspace,useWorkspaces,useMe,useFlag,useFlags,useBilling,usePlans,useUsage,useQuota,useLiveStatus,useCanManageBilling,useCanManageTeam…/auth/*): password, sign-in link, passkeys, hosted mode, hand-off, invites, workspaces, the too-many-attempts wait. Team panel. Plan picker, portal, subscription status, notices, quota banner, upgrade dialog viabridgeFetch.'local'(default) or'memory', as svelte. Copy in svelte's 12 languages.ReactNode/render props of the same name,onclose→onClose,key→flagKey, stores → hooks (table inlearning/README.md).Not ported: server helpers (
/server): React has no server side; an API uses@nebulr-group/bridge-auth-core/serveror the Express/NestJS plugins.Tests (in containers)
tscclean (plugin and demo), package builds and loads in Node.https://claude.ai/code/session_01G1bV8Xv8bNjMNToHyYYCgW