# OAuth - Bitbucket 1. Sign up for a Bitbucket Account 2. Open settings page from the Profile dropdown ![](https://i.imgur.com/RtSCZLu.png) 3. Click **OAuth** in the Access Management section of the sidebar, than choose **Add consumer** ![](https://i.imgur.com/14Priyv.png) 4. Fill in OAuth consumer info. ![](https://i.imgur.com/ikHIhij.png) :::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 ![](https://i.imgur.com/CqadGpi.png) 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. ![](https://i.imgur.com/CZyA6Zn.png) 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`