# AuthKit: Streamlined Authentication with WorkOS and Radix

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/workos-authkit
Generated for open source discovery and AI-assisted research.

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.

GitHub: https://github.com/workos/authkit
OSRepos URL: https://osrepos.com/repo/workos-authkit

## 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.

## Topics

- authentication
- user-management
- sso
- oauth2
- passwordless
- TypeScript
- login-box
- radix-ui

## Repository Information

Last analyzed by OSRepos: Tue Mar 31 2026 09:32:23 GMT+0100 (Western European Summer Time)
Detail views: 4
GitHub clicks: 2

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## 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](https://dashboard.workos.com) (target="_blank").
    *   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:
        bash
        WORKOS_CLIENT_ID="<your Client ID>"
        WORKOS_API_KEY="<your Secret Key>"
        
3.  **Configure Redirects:** In your [WorkOS dashboard](https://dashboard.workos.com) (target="_blank"), 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.
    *   [Explore the hosted UI example](https://github.com/workos/authkit/tree/main/src/app/using-hosted-authkit) (target="_blank")
*   **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.
    *   [Explore the custom UI example](https://github.com/workos/authkit/tree/main/src/app/using-your-own-ui) (target="_blank")

## 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
*   [GitHub Repository](https://github.com/workos/authkit) (target="_blank")
*   [WorkOS User Management Documentation](https://workos.com/docs/user-management) (target="_blank")