# Single sign-on

> Let your team sign in through your identity provider, over SAML or OpenID Connect. Available on Enterprise.

With single sign-on (SSO), your team signs in to Typemark through your organization's identity provider: Okta, Microsoft Entra ID, Google Workspace, OneLogin, Auth0, Keycloak, or anything that speaks SAML 2.0 or OpenID Connect.

SSO is on Enterprise. It belongs to the account that owns your projects and covers every project that account owns. Set it up under **Account** > **Single sign-on**.

## 1. Prove your email domains

SSO signs in people whose email is on your domains, so Typemark needs to know the domains are yours.

1. Under **Your email domains**, add a domain, such as `acme.com`.
2. Add the TXT record Typemark shows to your DNS: the name `_typemark-sso.acme.com`, with a value starting `typemark-sso=`.
3. Click **Verify**. DNS changes can take a few minutes to show up.

A domain can be used by one organization at a time.

## 2. Connect your identity provider

Choose **SAML 2.0** or **OpenID Connect**, add Typemark as an app in your provider, and copy the details across.

<Tabs>
  <Tab title="SAML 2.0">
    Give your provider these two values from the page:

    - **Entity ID** (also called audience or identifier)
    - **ACS URL** (also called reply URL or single sign-on URL)

    Send the user's email address as the NameID, in the `emailAddress` format, or as an attribute named `email`.

    Then paste your provider's **Single sign-on URL** and **signing certificate** into Typemark. The **Issuer** is optional. When you set it, Typemark refuses responses from any other issuer.
  </Tab>
  <Tab title="OpenID Connect">
    Give your provider the **Redirect URI** from the page, and ask for the `openid email profile` scopes.

    Then paste the **Issuer URL**, **Client ID**, and **Client secret** into Typemark. Typemark finds everything else in your provider's `/.well-known/openid-configuration`. After you save the secret, Typemark never shows it again.
  </Tab>
</Tabs>

Click **Save**, then **Turn on**.

## Signing in

Your team signs in at `typemark.dev/users/sso`, or with **Single sign-on (SSO)** on the sign-in page. They type their work email and Typemark sends them to your provider.

If someone signs in through SSO for the first time and has no Typemark account, Typemark makes one. If they were invited to a project, they join it.

If someone turned on [two-factor authentication](https://docs.typemark.dev/team/account-security) in Typemark, they still enter their code after SSO.

## Require single sign-on

Once SSO works, you can make it the only way in for people on your domains. Click **Require single sign-on**. You need to have signed in through SSO once first, so a mistake in the setup can't lock your team out.

When SSO is required:

- people on your domains can't sign in with a password, GitHub, or an email link
- anyone already signed in another way is signed out and asked to use SSO
- API tokens and `typemark login` sessions made before you required it stop working, and people run `typemark login` again

People whose email isn't on your domains, such as contractors, sign in as before.

<Callout type="info">
  You, the account owner, can always sign in with your password, so you can fix the setup if your provider ever has a problem.
</Callout>

## Turning it off

Click **Make it optional** to allow other ways in again, or **Turn off** to stop SSO. If your account leaves Enterprise, SSO turns off by itself, and everyone signs in the way they did before. If someone never had a password, they can set one with **Forgot password**.
