> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackone.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom OAuth Callback Domains

> Send OAuth callbacks to a domain you own, for providers that only accept a redirect URI on your own domain.

> [!NOTE]
>
> Custom OAuth domains is only available on certain plans.  See [plans and pricing](https://www.stackone.com/pricing/).

After a user authorizes an OAuth app, the provider sends them back to the app's callback URL. By default that URL is on StackOne's API host. A custom callback domain moves it onto a subdomain you own, so the OAuth apps you register point to your domain. Some providers only accept a callback URL on a domain that belongs to the app's owner, and these need one.

**Organization Admins** add and verify domains for the whole organization. **Project Admins** and **Organization Admins** then choose one on a Connector Profile in any project.

## Add a domain

**1. Add the domain**

1. Open [**Organization > Domains**](https://app.stackone.com/organization/domains).
2. Select **Add domain**.
3. In **Domain**, enter a subdomain you control, such as `auth.acme.com`. Root domains, wildcards, ports, and paths aren't supported.
4. Select **Add domain**. The domain's DNS records open.

**2. Prove you own it**

1. With your DNS provider, create the TXT record shown in the DNS records.
2. Select **Verify**. The domain becomes **Verified** once StackOne finds the record.

DNS changes can take up to 48 hours to propagate. To come back later, select **DNS records** from the domain's row menu.

**3. Route callbacks to StackOne**

1. With your DNS provider, create the CNAME record shown in the DNS records.
2. Select **Check again**.

Once the CNAME resolves, StackOne issues a certificate for the domain, which can take a few minutes. The domain then becomes **Active** and can be used on Connector Profiles.

## Use a domain on a Connector Profile

**1. Choose the callback domain**

1. Open [Connectors](https://app.stackone.com/connectors) and open the connector.
2. Add an OAuth profile, or select **Edit profile** from an existing profile's menu. See [Connector Profiles](https://docs.stackone.com/connect/managing-connectors/connector-profiles.md).
3. In **Callback domain**, select your domain.
4. Select **Create Profile** or **Save Changes**.

**2. Register the callback URL with the provider**

Copy the **Callback URL** from the profile and register it as the redirect URI in the provider's OAuth app. On a custom domain it takes the form `https://<your-domain>/connect/oauth2/<connector-key>/callback`.

To go back to StackOne's callback URL, select **StackOne default** in **Callback domain**, then update the redirect URI registered with the provider.

> [!NOTE]
>
> A profile uses its custom domain only while your plan includes custom OAuth domains. Without it, the profile goes back to StackOne's callback URL.

## Delete a domain

A domain can't be deleted while a Connector Profile uses it.

**1. Move profiles off the domain**

For each Connector Profile that uses the domain:

1. Set **Callback domain** to **StackOne default** or another active domain.
2. Update the redirect URI registered with the provider to the profile's new **Callback URL**.

**2. Delete the domain**

1. Open [**Organization > Domains**](https://app.stackone.com/organization/domains).
2. Select **Delete** from the domain's row menu.
3. Select **Delete**.

OAuth callbacks on a deleted domain stop working within a minute.

## Related

> [card] [Connector Profiles](https://docs.stackone.com/connect/managing-connectors/connector-profiles.md)
>
> Set up how each group of users connects to a provider.

> [card] [Use Your Own OAuth Apps](https://docs.stackone.com/connect/managing-connectors/using-your-own-oauth-apps.md)
>
> Register your own OAuth app with a provider instead of StackOne's.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.