Skip to content

Conversation

wobsoriano
Copy link
Member

@wobsoriano wobsoriano commented Oct 1, 2025

🔎 Previews:

What does this solve?

What changed?

  • Updated quickstart to include clerkMiddleware() installation
  • Updated all @clerk/react-router/ssr.server imports to `@clerk/react-router/server
  • Removed the options from rootAuthLoader() as it's required to have it in the middleware instead

Checklist

  • I have clicked on "Files changed" and performed a thorough self-review
  • All existing checks pass

Copy link

vercel bot commented Oct 1, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
clerk-docs Ready Ready Preview Oct 7, 2025 9:50pm

@wobsoriano
Copy link
Member Author

wobsoriano commented Oct 2, 2025

@alexisintech @SarahSoutoul what could possibly be my error here? Not able to build on Vercel 👀

@SarahSoutoul
Copy link
Contributor

@alexisintech @SarahSoutoul what could possibly be my error here? Not able to build on Vercel 👀

Hey @wobsoriano - we had the recent restructure of our docs, and your changes included some old paths. Fixed them here: docs review. The deployment is still failing because the Root Auth Loader page is still referencing the root-auth-loader-options hash but you removed that section. I kept it because I wasn't sure if that was on purpose or not. If it is, then that hash needs to be removed for things to pass.

Screenshot 2025-10-02 at 10 30 23 am

@wobsoriano
Copy link
Member Author

If it is, then that hash needs to be removed for things to pass.

@SarahSoutoul yes, that thing isn't needed anymore 🙏🏼

@SarahSoutoul
Copy link
Contributor

Member

@wobsoriano Hmm so do you wanna remove that whole Pass configuration options section, cause we could remove the hash from that sentence: To pass configuration [options](#root-auth-loader-options) to rootAuthLoader(), you can pass an optional argument to the rootAuthLoader() function..

But them, it doesn't make much sense, as like the user might wonder "what configuration options?".

@wobsoriano wobsoriano changed the title docs: React Router middleware Introduce React Router middleware Oct 2, 2025
@wobsoriano wobsoriano marked this pull request as ready for review October 2, 2025 22:44
@wobsoriano wobsoriano requested a review from a team as a code owner October 2, 2025 22:44
@SarahSoutoul
Copy link
Contributor

Reviewed everything. I noticed two things but wanted to check with you both on what you think @alexisintech @wobsoriano:

  1. The clerkMiddleware() options section lists out an organizationSyncOptions? property with the foillowing type: OrganizationSyncOptions | undefined. However, when I click on it, it doesn't lead to anything, as there is no section in that page titled OrganizationSyncOptions. When I checked the Next.js clerkMiddleware page, I saw that the section is present there. So my question is do we want to duplicate that section on the React Router clerkMiddleware page (create a partial for e.g.), or do we want the user to be navigated to that section in the Next.js clerkMiddleware page? This is the case for other SDKs that have a clerkMiddleware page. That property just leads nowhere when clicked.
Screenshot 2025-10-03 at 3 28 05 pm
  1. The second thing is regarding the Protect routes section that is present on most clerkMiddleware guides/ pages. Do we want to bring it in the React Router one or is it not applicable?
Screenshot 2025-10-03 at 3 26 33 pm

@SarahSoutoul
Copy link
Contributor

This is more of a note to self, but we'll need to update the React Router onboarding docs if I'm not mistaken?

@wobsoriano
Copy link
Member Author

wobsoriano commented Oct 5, 2025

@SarahSoutoul

  1. Opened a PR (merged) on our JS repo to accept that option in React Router's clerkMiddleware(), as we actually don't accept it currently, but the underlying authenticateRequest() does. I think we can duplicate the page as a partial.

  2. Yeah, definitely adding that "protect routes" section would be useful for React Router as well!

@alexisintech alexisintech changed the title Introduce React Router middleware React Router SDK: Introduce middleware; update clerkClient usage Oct 7, 2025
@alexisintech
Copy link
Member

@SarahSoutoul

  1. Opened a PR (merged) on our JS repo to accept that option in React Router's clerkMiddleware(), as we actually don't accept it currently, but the underlying authenticateRequest() does. I think we can duplicate the page as a partial.
  2. Yeah, definitely adding that "protect routes" section would be useful for React Router as well!

agree - duplicate the section with a partial.

@alexisintech
Copy link
Member

going to work on these action items now!

@alexisintech
Copy link
Member

now, we just need to add some protect routes examples - @wobsoriano do you mind spinning up these examples?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants