Skip to content

Latest commit

 

History

History

using-your-own-ui

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Using AuthKit with your own UI

How to use AuthKit with your own frontend using headless User Management APIs

View the examples  ·  Explore the docs ↗




Setup

First, ensure you have set up the environment variables and redirects.

For each example, you will need to ensure the applicable authentication method is enabled in your WorkOS dashboard. To do so navigate to Authentication and edit the applicable authentication method and ensure it is set to Enabled.

For the Google OAuth and Microsoft OAuth examples, WorkOS provides demo app credentials to use in your WorkOS staging environment. This allows you to test these authentication flows without having to set up your own OAuth apps.

Examples

Sign-up

Sign-in

For the Single Sign-On example, you will need to create an organization in your WorkOS dashboard. Navigate to Organizations and then Create organization. Enter a name for this organization, and optionally add a domain that the members will use to sign in. You will also need to create a Single Sign-On connection in the WorkOS dashboard for this organization. On this organization's detail page, navigate to the authentication section, find Single Sign-On. For the purposes of this example, we will use the Configure Manually feature to create a new connection. This requires you to have access to an identity provider (IdP) for testing such as Entra ID (Azure AD), Google Workspace, or Okta.

You will also need to copy the Organization ID from the organization you created with the active Single Sign-On connection. This is located below the organization's name on its detail page (beginning with org_). Copy it and add it to your .env.local file.

SSO_ENABLED_ORGANIZATION_ID="<your Organization ID>"

Other