Clerk React Router SDK
Clerk makes it simple to add authentication to your React Router application. This reference lists the features and methods available in Clerk's React Router SDK.
Client-side helpers
The Clerk React Router SDK is built on top of the Clerk React SDK and provides access to all of Clerk React's hooks. These hooks give you access to the Clerk
object and a set of useful helper methods for signing in and signing up. Learn more about these hooks in the React SDK reference.
Server-side helpers
The following references show how to integrate Clerk features into applications using React Router server functions and API routes.
Auth
object
The getAuth()
method returns an Auth
object. This JavaScript object contains important information like the current user's session ID, user ID, and organization ID. Learn more about the Auth
object.
React Router implementations
React Router can be integrated with Clerk in two ways:
- As a framework (recommended): Configure your app using Clerk's React Router SDK
- As a library: Manually integrate React Router into your React + Vite app using library mode
Feedback
Last updated on