https://github.com/workos/remix-authkit-example
Remix integration example using AuthKit
https://github.com/workos/remix-authkit-example
Last synced: about 1 year ago
JSON representation
Remix integration example using AuthKit
- Host: GitHub
- URL: https://github.com/workos/remix-authkit-example
- Owner: workos
- License: mit
- Created: 2024-06-12T15:47:22.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-28T14:18:11.000Z (about 1 year ago)
- Last Synced: 2025-04-02T20:50:18.863Z (about 1 year ago)
- Language: TypeScript
- Size: 925 KB
- Stars: 9
- Watchers: 7
- Forks: 3
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Remix integration example using AuthKit
An example application demonstrating how to authenticate users with AuthKit and the authkit-remix helper library.
> Refer to the [User Management](https://workos.com/docs/user-management) documentation for reference.
## Prerequisites
You will need a [WorkOS account](https://dashboard.workos.com/signup).
## Requirements
Node v18 or higher
## Running the example
Rename the `.env.example` file to `.env` and supply your Client ID and API key as environment variables. The client ID and API key can be found in the [WorkOS dashboard](https://dashboard.workos.com/), and the redirect URI can also be configured there.
```sh
WORKOS_CLIENT_ID=client_... # retrieved from the WorkOS dashboard
WORKOS_API_KEY=sk_test_... # retrieved from the WorkOS dashboard
WORKOS_REDIRECT_URI=http://localhost:3000/callback # configured in the WorkOS dashboard
WORKOS_COOKIE_PASSWORD= # generate a secure password here
```
`WORKOS_COOKIE_PASSWORD` is the private key used to encrypt the session cookie. It has to be at least 32 characters long. You can use the [1Password generator](https://1password.com/password-generator/) or the `openssl` library to generate a strong password via the command line:
```
openssl rand -base64 24
```
Install the dependencies
```bash
npm install
```
Run the following command and navigate to [http://localhost:3000](http://localhost:3000).
```bash
npm run dev
```