Uh oh!
There was an error while loading. Please reload this page.
chore(react-router): Accept organizationSyncOptions option in middleware - #6927
Conversation
🦋 Changeset detectedLatest commit: 5025068 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughThe change adds an optional organizationSyncOptions property to ClerkMiddlewareOptions and forwards that option from loadOptions(...) into authenticateRequest(...) inside clerkMiddleware. No function signatures or return types changed; middleware control flow (handshake, headers, context, response) is unchanged. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Client
participant Router
participant clerkMiddleware
participant ClerkBackend as Clerk Backend
Client->>Router: HTTP Request
Router->>clerkMiddleware: Invoke with request/context
note over clerkMiddleware: loadOptions(args, options)\nmay include organizationSyncOptions
clerkMiddleware->>ClerkBackend: authenticateRequest(request, { ..., organizationSyncOptions })
alt Authenticated
ClerkBackend-->>clerkMiddleware: RequestState (SignedIn/SignedOut)
clerkMiddleware-->>Router: Continue with context set
Router-->>Client: Response
else Handshake/Redirect
ClerkBackend-->>clerkMiddleware: Handshake/Redirect response
clerkMiddleware-->>Client: Proxy handshake/redirect response
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
@clerk/agent-toolkit@clerk/astro@clerk/backend@clerk/chrome-extension@clerk/clerk-js@clerk/dev-cli@clerk/elements@clerk/clerk-expo@clerk/expo-passkeys@clerk/express@clerk/fastify@clerk/localizations@clerk/nextjs@clerk/nuxt@clerk/clerk-react@clerk/react-router@clerk/remix@clerk/shared@clerk/tanstack-react-start@clerk/testing@clerk/themes@clerk/types@clerk/upgrade@clerk/vuecommit: |
LauraBeatris
left a comment
There was a problem hiding this comment.
Thanks for adding this to the react-router middleware! 🫡
Uh oh!
There was an error while loading. Please reload this page.
Description
This PR adds the
organizationSyncOptionsoption to React Router'sclerkMiddleware().Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
Summary by CodeRabbit
New Features
Documentation