# OAuth - Bitbucket
1. Sign up for a Bitbucket Account
2. Open settings page from the Profile dropdown

3. Click **OAuth** in the Access Management section of the sidebar, than choose **Add consumer**

4. Fill in OAuth consumer info.

:::info
:bulb: Your Callback URL should be like this: `https://your-codimd.domain/auth/bitbucket/callback`
:::
5. Check **Email** and **Read** in the Permission section

6. Click save.
7. The name of consumer should be listed in the **OAuth Consumers** section now. Please save the **Key** and the **Secret**. We'll use them later.

8. Set the following environment variables to your CodiMD app. Then restart the application.
```bash
CMD_BITBUCKET_CLIENTID=xxxxxxxxxxxxxx
CMD_BITBUCKET_CLIENTSECRET=xxxxxxxxxxxxxxxx
```
9. Bitbucket login button should be appear as login option now.
###### tags: `CodiMD` `Docs`