Loading…
Get the weekly radar
One short email with the freshest products, every week.
How to use AuthKit's hosted UI or build your own frontend with the headless User Management APIs
There are two ways to use AuthKit and this repository contains examples for both:
auth.yourapp.com) to match your application.You will need a WorkOS account.
Install dependencies with npm install or yarn install
Set up your Environment variables by signing into your WorkOS dashboard, navigate to API Keys and copy the Client ID and the Secret Key (API Key).
Rename the .env.local.example file to .env.local and supply your Client ID and Secret Key.
WORKOS_CLIENT_ID="<your Client ID>" WORKOS_API_KEY="<your Secret Key>"
Configure redirects in your WorkOS dashboard, navigate to Redirects and add the following urls:
http://localhost:3000/using-your-own-ui/sign-in/google-oauth/callback
http://localhost:3000/using-your-own-ui/sign-in/microsoft-oauth/callback
http://localhost:3000/using-your-own-ui/sign-in/github-oauth/callback
http://localhost:3000/using-your-own-ui/sign-in/sso/callback
http://localhost:3000/using-hosted-authkit/basic/callback
http://localhost:3000/using-hosted-authkit/with-session/callback
http://localhost:3000/using-hosted-authkit/with-nextjs/callback
Run the example with npm run dev or yarn dev and navigate to http://localhost:3000