AuthKit: Streamlined Authentication with WorkOS and Radix

AuthKit: Streamlined Authentication with WorkOS and Radix

Summary

AuthKit is an open-source login box solution developed by WorkOS, designed to simplify authentication for applications. It offers both a fully themeable hosted UI and headless APIs for custom frontends, powered by WorkOS User Management and Radix UI. This TypeScript project supports various authentication flows, including OAuth2, passwordless, and SSO.

Repository Info

Updated on March 31, 2026
View on GitHub

Tags

Click on any tag to explore related repositories

Introduction

AuthKit, developed by WorkOS, provides a robust and flexible solution for implementing authentication in your applications. Described as "the world's best login box," it leverages WorkOS User Management and Radix UI to offer a seamless and secure user experience. Whether you prefer a quick-to-deploy hosted UI or a custom frontend integration, AuthKit simplifies complex authentication flows.

Installation

To get started with AuthKit, you'll need a WorkOS account. Once you have an account, follow these steps to run the examples:

  1. Install Dependencies: Run npm install or yarn install in the repository.
  2. Set up Environment Variables:
    • Sign into your WorkOS dashboard.
    • Navigate to API Keys and copy your Client ID and Secret Key (API Key).
    • Rename .env.local.example to .env.local and populate it with your keys:
      WORKOS_CLIENT_ID="<your Client ID>"
      WORKOS_API_KEY="<your Secret Key>"
      
  3. 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
  4. Run the Example: Execute npm run dev or yarn dev and open http://localhost:3000 in your browser.

Examples

AuthKit offers two primary methods for integration, both with examples provided in the repository:

  • Using AuthKit's hosted UI: This is the quickest way to add authentication. It provides a fully themeable hosted UI that manages all authentication flows. For production, you can use a custom domain.
  • Using your own custom UI: For full control over the user interface, you can build your own frontend by integrating directly with the headless WorkOS User Management APIs. Your authentication UI will be self-hosted.

Why use AuthKit

AuthKit simplifies the complex task of user authentication, offering a comprehensive suite of features out-of-the-box. Its flexibility allows developers to choose between a ready-to-use hosted solution or a customizable headless API approach. With support for various authentication methods like OAuth2, passwordless, and SSO, and built on reliable technologies like WorkOS and Radix UI, AuthKit provides a secure, scalable, and developer-friendly way to manage user logins.

Links