Single sign-on (OIDC)
A workspace owner can let the team sign in with the company's identity provider over OpenID Connect (OIDC). It works with any provider that supports OIDC's authorization code flow with a client secret: Okta, Google Workspace, Microsoft Entra ID, Auth0, JumpCloud and others. Each workspace has one provider. SAML and SCIM aren't supported yet (see what isn't supported yet).
How it works
- On the sign-in page, people choose Sign in with SSO and enter their work email. Its domain picks your workspace (verified domains only) and Sandworld sends them to your identity provider.
- Sandworld uses the authorization code flow with PKCE (S256), a
stateand anonce. It checks the ID token's signature against your provider's published keys (JWKS), its issuer, audience, expiry and nonce, and requires a verified email (email_verifiedtrue) in one of your workspace's verified domains. - Someone already in your workspace is signed in. Someone new joins it with the role you chose for new people (viewer or member) if your plan has a free seat, or with their invite's role if they have an open invite. An email that already has a Sandworld account in another workspace is refused, never moved.
- Sessions work as with a password: they last 30 days or until the person signs out.
What to register with your provider
Only an owner of the workspace can set up SSO, under Members → Single sign-on in the app. Register Sandworld with your provider as a web application using:
- Sign-in redirect URI (callback URL):
https://sandworld.dev/api/auth/sso/callback - Scopes:
openid email profile - Grant type: authorization code. Client authentication: client secret (client_secret_basic or client_secret_post).
Then enter the provider's issuer URL, client ID and client secret in Sandworld. Sandworld reads the issuer's /.well-known/openid-configuration and keys before saving, so a wrong issuer is caught straight away. The client secret is encrypted at rest (AES-256-GCM) and never shown again or returned by the API.
Okta
- In the Admin Console, go to Applications → Applications → Create App Integration, choose OIDC - OpenID Connect and Web Application.
- Keep the Authorization Code grant type, add the redirect URI above as a Sign-in redirect URI, and leave the sign-out redirect empty.
- Under Assignments, assign the people or groups who should use Sandworld.
- Copy the Client ID and Client secret. The issuer is your Okta domain, like
https://acme.okta.com; with a custom authorization server, use its issuer, likehttps://acme.okta.com/oauth2/default.
Google Workspace
- In the Google Cloud console, under APIs & Services → OAuth consent screen, set the user type to Internal so only your Workspace accounts can sign in.
- Under Credentials → Create credentials → OAuth client ID, choose Web application and add the redirect URI above under Authorized redirect URIs.
- Copy the client ID and secret. The issuer is
https://accounts.google.com.
For Google, Sandworld also requires the ID token's hd claim (the Workspace domain) to match the email's domain, so a personal Google account registered with a company address is never taken for a company account.
Microsoft Entra ID
- In the Entra admin center, go to App registrations → New registration. Choose Accounts in this organizational directory only and add the redirect URI above with the Web platform.
- Under Certificates & secrets, create a client secret and copy its Value (not the secret ID).
- Under Token configuration → Add optional claim → ID, add
emailandxms_edov. Entra doesn't sendemail_verified; for Entra issuers only, Sandworld acceptsxms_edovtrue (the email's domain is verified in your tenant) instead. People need an email address on their Entra account. - The issuer is
https://login.microsoftonline.com/<tenant-id>/v2.0, with the Directory (tenant) ID from the app's overview. Use your tenant's issuer, notcommonororganizations.
Auth0, JumpCloud and other providers
Create a regular web application (OIDC, authorization code, client secret) with the redirect URI and scopes above, and enter the issuer exactly as your provider shows it: Auth0's, for example, ends with a slash (https://acme.us.auth0.com/). Sandworld needs a discovery document at the issuer, ID tokens signed with a public-key algorithm (RS256, ES256, EdDSA and the like) and the email and email_verified claims.
Verify your domains
- Under Single sign-on → Verify your email domains, add each domain your team's emails use, like
acme.com. - At your DNS host, add a TXT record on the domain itself (host or name
@) with the value Sandworld shows:sandworld-verify=<token>. - Choose Check DNS. DNS changes can take a few minutes, sometimes a few hours. Once the domain is verified you can delete the record.
- Until a domain is verified, SSO doesn't work for it.
- A domain can be verified by one Sandworld workspace only. If another workspace has verified yours, write to us.
- Subdomains are separate domains: add
eng.acme.comtoo if people's emails use it.
Require SSO
With Require single sign-on on, password sign-in is refused for people in your workspace whose email is in one of its verified domains.
- Owners keep their password: it's the way in if your identity provider is down or misconfigured. Keep at least one owner with a strong, unique password.
- It takes effect at each person's next sign-in; sessions already open continue until they expire or the person signs out.
- Someone invited with an email in a verified domain joins through SSO, which uses their invite.
- People whose email is in another domain (a contractor's own address, say) keep signing in with a password.
What isn't supported yet
- SAML: not supported yet. Use your provider's OIDC app instead; Okta, Entra ID, Google Workspace, Auth0 and JumpCloud all offer one.
- SCIM provisioning and deprovisioning: not supported yet. Unassigning someone in your provider stops their next SSO sign-in, but a session they already have continues for up to 30 days: remove them under Members too.
- Starting from your provider's dashboard (IdP-initiated sign-in): people start from Sandworld's sign-in page.
- Roles from your provider's groups: roles are set in Sandworld, under Members.
- Sandworld staff and expert accounts, and the demo workspace, don't use SSO.
Security details
- The client secret is encrypted at rest with AES-256-GCM, bound to your workspace, and never sent back by any API.
- The issuer's discovery document, keys and token endpoint are reached only through Sandworld's outbound guard: public https addresses, checked again when connecting, with no redirects followed.
- Sign-in starts and callbacks are rate-limited. Changes to the settings, domain checks and SSO sign-ins (and failed ones) are recorded in your workspace's audit log. See Security.