SaaS Starter (WorkOS)

Authentication, organizations, roles, and sessions powered by WorkOS. This is the starter-saas-workos pack.

What you need

WorkOS credentials

In your WorkOS dashboard, grab:

Put these in apps/backend/.env.

Google OAuth through WorkOS

Enable Google under Authentication > Google in your WorkOS dashboard. WorkOS gives you the redirect URL to paste into Google; you don't manage the Google app directly.

The pack starts Google sign-in from GET /auth/google/:intent and passes this redirect URI to WorkOS:

http://localhost:3000/auth/google/callback

Register that exact URL in WorkOS > Dashboard > Redirects. In production, swap the origin for your deployed domain:

https://yourdomain.com/auth/google/callback

Environment variables

VariablePurpose
WORKOS_CLIENT_IDWorkOS project client ID
WORKOS_API_KEYWorkOS server API key
WORKOS_COOKIE_PASSWORDSession cookie encryption key (min 32 chars)
WORKOS_GOOGLE_OAUTH_CALLBACKGoogle OAuth redirect URI (see above)
RESEND_API_KEYTransactional email (password reset, invites)