Skip to content

tclain-pillar/remix-authkit-example

 
 

Repository files navigation

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 documentation for reference.

Prerequisites

You will need a WorkOS account.

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, and the redirect URI can also be configured there.

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=<your 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 or the openssl library to generate a strong password via the command line:

openssl rand -base64 24

Install the dependencies

npm install

Run the following command and navigate to http://localhost:3000.

npm run dev

About

Remix integration example using AuthKit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 84.8%
  • JavaScript 15.2%