An example application demonstrating how to authenticate users with AuthKit's React SDK.
You will need a WorkOS account.
-
In the WorkOS dashboard, head to the Redirects tab and create a sign-in callback redirect for
http://localhost:5173. -
Navigate to the "Authentication" page, and select "Sessions" from the sub-menu. Click Manage from the "Cross-Origin Resource Sharing (CORS)" section and add
http://localhost:5173to the list of allowed web origins. Click "Save." -
Navigate to the "Overview" page on the left-hand sidebar and copy the Client ID. Rename the
.env.local.examplefile to.env.localand supply your Client ID. -
Run the following command and navigate to http://localhost:5173.
npm run dev