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

# Bitbucket

> Set up Bitbucket as an authentication provider with Hexclave

This guide explains how to set up Bitbucket as an authentication provider with Hexclave. Bitbucket OAuth allows users to sign in to your application using their Bitbucket account.

## Integration Steps

<Steps>
  <Step title="Create a Bitbucket OAuth App">
    1. Log in to your [Bitbucket Workspaces account](https://bitbucket.org/account/workspaces/).
    2. Under **Workspaces**, find your workspace and select **Manage**.
    3. In the left sidebar, scroll down and select **OAuth consumers**.
    4. Click **Add consumer**.
    5. Fill out the form with the following details:
       * **Name**: Choose a name for your application
       * **Description**: Add a brief description of your application
       * **Callback URL**: Enter `https://api.hexclave.com/api/v1/auth/oauth/callback/bitbucket`
       * **Permissions**: Under **Account**, select at minimum **Email** and **Read**
    6. Click **Save**.
    7. You'll be redirected to the OAuth consumers page. Select your newly created consumer to view its details.
    8. Note the **Key** (Client ID) and **Secret** values. Save these somewhere secure as you'll need them for the next steps.
  </Step>

  <Step title="Enable Bitbucket OAuth in Hexclave">
    1. On the Hexclave dashboard, select **Auth Methods** in the left sidebar.
    2. Click **Add SSO Providers** and select **Bitbucket** as the provider.
    3. Set the **Client ID** (the Key from your Bitbucket OAuth consumer) and **Client Secret** you obtained from Bitbucket earlier.
  </Step>
</Steps>

### Need More Help?

* Check the [Bitbucket OAuth documentation](https://developer.atlassian.com/cloud/bitbucket/oauth-2/)
* Join our [Discord](https://discord.hexclave.com)
