Remix SPA Mode
You will learn the following:
- Install
@clerk/remix
- Set your environment variables
- Configure
ClerkApp
- Update your paths through
ClerkApp
options - Protecting your pages
Before you start
Install @clerk/remix
Once you have a Remix application ready, you need to install Clerk's Remix SDK. This gives you access to our prebuilt components and hooks for Remix applications.
Add your Clerk Publishable Key to your .env
file. It can always be retrieved from the API keys page in the Clerk Dashboard.
- In the Clerk Dashboard, navigate to the API keys page.
- In the Quick Copy section, copy your Clerk Publishable Key.
- Paste your key into your
.env
file.
The final result should resemble the following:
Configure ClerkApp
Clerk provides a ClerkApp
wrapper to provide the authentication state to your React tree.
Update your paths through ClerkApp options
Next, add paths to your ClerkApp
options to control the behavior of the components when you sign in or sign up and when you click on the respective links at the bottom of each component.
Protecting your pages
Clerk offers Control Components that allow you to protect your pages. These components are used to control the visibility of your pages based on the user's authentication state.
Next steps
Now that you have an application integrated with Clerk, you will want to read the following documentation:
Customization & Localization
Learn how to customize and localize the Clerk components.
Authentication Components
Learn more about all our authentication components.
Client Side Helpers
Learn more about our client-side helpers and how to use them.
Feedback
Last updated on