authkit: Add Hosted or Custom Authentication to Your App

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
View on GitHub

Topics

Click on any tag to explore related repositories

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

View on GitHub

Related repositories

Similar repositories that may be relevant next.

OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️