authkit: Add Hosted or Custom Authentication to Your App

Summary
AuthKit is a WorkOS authentication example project showing how to use a hosted sign-in experience or build a custom UI with headless User Management APIs. It is aimed at developers adding WorkOS-backed authentication to an application.
At a glance
- Language
- TypeScript
- License
- MIT
- Stars
- 3.3k
- Forks
- 168
- Added to OSRepos
- March 31, 2026
- Last analyzed
- October 3, 2026
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Overview
AuthKit demonstrates two ways to add WorkOS User Management authentication to an application: redirect users to a themeable hosted sign-in UI, or build and host your own interface using WorkOS APIs. It helps developers evaluate and integrate these approaches without having to design every authentication flow from scratch.
The repository is an example application rather than a standalone identity provider. You need a WorkOS account and credentials, and your app must be configured with the appropriate redirect URLs.
Key Features
- Example integration with WorkOS's hosted AuthKit UI.
- Example of a custom, self-hosted authentication UI using headless User Management APIs.
- Hosted UI can be themed and configured to use a custom domain.
- Examples cover OAuth sign-in with Google, Microsoft, and GitHub.
- Includes SSO callback examples.
- Provides environment variable and redirect URL setup guidance.
Use Cases
- A developer wants to add authentication quickly and prefers WorkOS's hosted UI over maintaining sign-in screens.
- A product team needs a branded authentication experience and wants to build its own UI with WorkOS User Management APIs.
- An engineer is comparing hosted and self-hosted authentication approaches before choosing one for an application.
- A team integrating social login or SSO wants a working example of the related callback setup.
Project Facts
- Language: TypeScript
- License: MIT
- Stars: 3.3k
- Forks: 168
- Topics: auth, authentication, authentication-backend, authentication-middleware, authn, magic-code, oauth2, passwordless-authentication, radix-ui, sso-authentication, user-management
- Archived: No
Getting Started
Requires a WorkOS account and API credentials. Clone the repository, install dependencies, configure .env.local and the redirect URLs using the README, then run:
npm install
npm run dev
Considerations
- The examples depend on WorkOS services and require a WorkOS account, client ID, API key, and configured redirect URLs.
- The hosted and custom UI approaches have different deployment responsibilities: the hosted UI is managed through WorkOS, while a custom UI is hosted in your application.
- This repository provides examples, so adapt the configuration and flows to your application's requirements. Consult the WorkOS User Management documentation for integration details.
Source repository
Open the original repository on GitHub.
12 counted GitHub visits
Related repositories
Similar repositories that may be relevant next.

OrcaReplay: Record and Replay AI Agent Runs
October 2, 2026
OrcaReplay records AI agent runs so developers can inspect what happened, replay interactions offline, and fork a run from a checkpoint onto another model. It is a TypeScript CLI for debugging and comparing agent behavior without modifying the agent.

openmake_llm: Coordinate AI Models, Agents, and Tools
October 1, 2026
OpenMake is a self-hosted AI workspace that coordinates chat models, agents, and tools in one place. It suits people who want multi-step AI workflows with local or open-weight models, while keeping infrastructure and model choices under their control.

zennotes: Manage Markdown Notes with Keyboard-First Tools
October 1, 2026
ZenNotes is a local-first Markdown notes app for people who prefer plain files, keyboard navigation, and Vim motions. It runs as an Electron desktop app or a self-hosted web app, with search, diagrams, CLI, and MCP integrations.

Kun: Local-First AI Agent Workspace
September 27, 2026
Kun is a local-first workspace for using AI agents across coding, writing, design, research, and automation. Its desktop GUI and terminal TUI share one runtime, keeping tasks and approvals connected.