Skip to main content
Whilst uses WorkOS for authentication, providing SSO, email verification, and organization management.

Setup

1

Create a WorkOS account

Sign up at workos.com and create a new project.
2

Configure your application

In the WorkOS Dashboard:
  • Go to Applications → Create a new application
  • Add redirect URI: http://127.0.0.1:3000/api/auth/workos/callback (local dev)
  • Add redirect URI: https://app.whilst.io/api/auth/workos/callback (production)
3

Enable Organizations

Go to Organizations and enable “Allow organization creation via API”.
4

Set environment variables

In production redirect URIs, HTTP protocol can only be used with the IP address 127.0.0.1. All other production URIs must use HTTPS.

Auth Flow

Testing

Run the WorkOS test script to verify your configuration:
Expected output:

Session Structure

After authentication, the session contains: