-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
chore(examples): Use updated Clerk SDK #5514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(examples): Use updated Clerk SDK #5514
Conversation
WalkthroughThis PR refactors Clerk authentication integration in the TanStack React Start example from a server-handler approach to a middleware-based approach. It removes the default server export, adds a start.ts middleware configuration, updates route handling to use the auth() function, and bumps dependencies including the new srvx runtime package. Changes
Sequence DiagramsequenceDiagram
participant Client
participant Start as TanStack Start
participant Middleware as requestMiddleware
participant ClerkMW as clerkMiddleware()
participant Auth as auth()
participant Server as Route Handler
Client->>Start: HTTP Request
Start->>Middleware: Process request
Middleware->>ClerkMW: Execute clerk middleware
ClerkMW->>ClerkMW: Initialize Clerk context
ClerkMW-->>Middleware: Context ready
Middleware->>Server: Route to handler
Server->>Auth: Fetch auth context
Auth-->>Server: Return auth data
Server-->>Client: Response
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Changes involve structural refactoring of authentication integration pattern (server handler → middleware approach), dependency version bumping, and import reorganization across multiple files. While individual changes are straightforward, the architectural shift requires understanding both the old and new patterns. Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
🧰 Additional context used📓 Path-based instructions (2)**/package.json📄 CodeRabbit inference engine (AGENTS.md)
Files:
examples/{react,solid}/**📄 CodeRabbit inference engine (AGENTS.md)
Files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (2)
Comment |
View your CI Pipeline Execution ↗ for commit cfa8b3d
☁️ Nx Cloud last updated this comment at |
More templates
@tanstack/arktype-adapter
@tanstack/directive-functions-plugin
@tanstack/eslint-plugin-router
@tanstack/history
@tanstack/nitro-v2-vite-plugin
@tanstack/react-router
@tanstack/react-router-devtools
@tanstack/react-router-ssr-query
@tanstack/react-start
@tanstack/react-start-client
@tanstack/react-start-server
@tanstack/router-cli
@tanstack/router-core
@tanstack/router-devtools
@tanstack/router-devtools-core
@tanstack/router-generator
@tanstack/router-plugin
@tanstack/router-ssr-query-core
@tanstack/router-utils
@tanstack/router-vite-plugin
@tanstack/server-functions-plugin
@tanstack/solid-router
@tanstack/solid-router-devtools
@tanstack/solid-start
@tanstack/solid-start-client
@tanstack/solid-start-server
@tanstack/start-client-core
@tanstack/start-plugin-core
@tanstack/start-server-core
@tanstack/start-static-server-functions
@tanstack/start-storage-context
@tanstack/valibot-adapter
@tanstack/virtual-file-routes
@tanstack/zod-adapter
commit: |
Summary by CodeRabbit
Chores
Refactor