Clerk Remix SDK
The Clerk Remix SDK gives you access to prebuilt components, React hooks, and helpers to make user authentication easier. Refer to the quickstart guide
ClerkApp
The ClerkApp component is a wrapper that provides Clerk's authentication state to your React tree. It is required to configure Clerk in your Remix application. Learn more in the reference
rootAuthLoader()
The rootAuthLoader() function is a helper function that provides the authentication state to your Remix application. It is required to configure Clerk in your Remix application. Learn more in the reference
Client-side helpers
Because the Remix SDK is built on top of the Clerk React SDK, you can use the hooks that the React SDK provides. These hooks include access to the Clerk
- useUser()
- useClerk()
- useAuth()
- useSignIn()
- useSignUp()
- useSession()
- useSessionList()
- useOrganization()
- useOrganizationList()
- useOrganizationCreationDefaults()
- useReverification()
- useCheckout()
- usePaymentElement()
- usePaymentMethods()
- usePlans()
- useSubscription()
- useStatements()
- usePaymentAttempts()
Server-side helpers
getAuth()
The getAuth() helper retrieves authentication state from the request object. Returns the Auth
- Name
args- Description
The arguments object.
- Name
opts?- Description
An optional object that can be used to configure the behavior of the
getAuth()function. It accepts the following properties:secretKey?: A string that represents the used to sign the session token. If not provided, the Secret Key is retrieved from the environment variableCLERK_SECRET_KEY.
See the dedicated guide
SPA mode
Clerk supports Remix in SPA mode out-of-the-box. Learn more in the tutorial.
Feedback
Last updated on