Accounts & access
Configure the built-in Better Auth accounts, public origins, and optional sign-in with Google, GitHub, Microsoft or your own identity provider.
Required account configuration
The app uses Better Auth with its PostgreSQL database. Generate a stable BETTER_AUTH_SECRET and set BETTER_AUTH_URL to the actual public product origin, particularly behind a reverse proxy.
Invite links, emails and OAuth callbacks are built on BETTER_AUTH_URL. APP_PUBLIC_URL is only where the document services fetch files from; behind a proxy it is usually the same origin.
BETTER_AUTH_SECRET=replace-with-a-random-secret
BETTER_AUTH_URL=https://workspace.example.com
APP_PUBLIC_URL=https://workspace.example.com
DEPLOYMENT_MODE=self-hostedKeep the landing origin separate from the authenticated app origin. The public site's NEXT_PUBLIC_APP_URL must be set during its build.
Optional social sign-in
Each provider gets a button on the sign-in, invitation and join pages once both its client ID and secret are set, and appears under Settings › Account so people can connect it to an existing account. Register its callback on BETTER_AUTH_URL.
Sign-in OAuth and workspace connections use different configuration names. A working Google login does not configure a Google Drive connection.
- AUTH_GOOGLE_CLIENT_ID / AUTH_GOOGLE_CLIENT_SECRET. Callback: /api/auth/callback/google
- GitHub
- AUTH_GITHUB_CLIENT_ID / AUTH_GITHUB_CLIENT_SECRET. Callback: /api/auth/callback/github
- Microsoft
- AUTH_MICROSOFT_CLIENT_ID / AUTH_MICROSOFT_CLIENT_SECRET. Callback: /api/auth/callback/microsoft
- Your identity provider (OIDC)
- AUTH_OIDC_ISSUER / AUTH_OIDC_CLIENT_ID / AUTH_OIDC_CLIENT_SECRET. Callback: /api/auth/callback/oidc
Microsoft work, school and personal accounts
Register an app in Microsoft Entra ID with a Web redirect URI of BETTER_AUTH_URL/api/auth/callback/microsoft and create a client secret. Sign-in asks only for openid, profile and email: no Microsoft Graph permissions.
AUTH_MICROSOFT_TENANT_ID decides who can sign in: common (the default) takes any Microsoft account, organizations only work and school accounts, consumers only personal accounts, and a tenant ID only that organization. Set AUTH_MICROSOFT_AUTHORITY for a national cloud, such as https://login.chinacloudapi.cn or https://login.microsoftonline.us.
AUTH_MICROSOFT_CLIENT_ID=00000000-0000-0000-0000-000000000000
AUTH_MICROSOFT_CLIENT_SECRET=replace-with-the-client-secret-value
AUTH_MICROSOFT_TENANT_ID=commonUnder Token configuration, add the verified_primary_email and verified_secondary_email optional claims to the ID token. Microsoft only confirms an address through them. An unconfirmed address can't join an account that already uses it; the person is told to sign in another way. The claims cover work and school accounts; a personal account Microsoft doesn't confirm can still sign up and sign in, just not join an existing account.
Your own identity provider (OIDC)
Point LaunchStack at any OpenID Connect provider: Okta, Microsoft Entra ID, Google Workspace, Keycloak, Authentik, Authelia, Zitadel or Pocket ID. Create a confidential web client with the redirect URI BETTER_AUTH_URL/api/auth/callback/oidc and the scopes openid, email and profile.
AUTH_OIDC_ISSUER is the issuer URL, the one /.well-known/openid-configuration lives under. AUTH_OIDC_NAME labels the button (Continue with Acme SSO); it defaults to SSO. Sign-in uses PKCE and checks the ID token against the issuer's published keys.
AUTH_OIDC_ISSUER=https://id.example.com/realms/acme
AUTH_OIDC_CLIENT_ID=launchstack
AUTH_OIDC_CLIENT_SECRET=replace-with-the-client-secret
AUTH_OIDC_NAME=Acme SSOLaunchStack trusts the provider's email_verified claim. A sign-in whose address the provider marks verified takes over an unconfirmed LaunchStack account with that address, so connect only a provider that confirms the addresses people sign in with.
Deployment mode
self-hosted is the default mode. cloud enables the hosted product's metering path and requires INNGEST_EVENT_KEY. Use self-hosted for an instance you operate, and configure workspace memberships and roles in the product.
Keep development preview routes disabled on public instances. ENABLE_DEV_ROUTES is for isolated development previews.