Docs

Custom Database Connections Overview

Connect your App to Bitbucket

To connect your Auth0 app to Bitbucket, you will need to generate a Key and Secret in a Bitbucket app, copy these keys into your Auth0 settings, and enable the connection.

This connection will only work with Lock version 9.2 or higher.

  1. Login to Bitbucket. Click on your account icon in the lower left and select Bitbucket settings. Select OAuth in the left nav.

  2. To create your app, click Add consumer. Provide a name for your app. In the Callback URL field, enter the following:

https://YOUR_DOMAIN/login/callback

Find your Auth0 domain name for redirects

If your Auth0 domain name is not shown above and you are not using our custom domains feature, your domain name is your tenant name, plus .auth0.com. For example, if your tenant name were exampleco-enterprises, your Auth0 domain name would be exampleco-enterprises.auth0.com and your redirect URI would be https://exampleco-enterprises.auth0.com/login/callback.

If you are using custom domains, your redirect URI will have the following format: https://<YOUR CUSTOM DOMAIN>/login/callback.

  1. Select the Permissions you want to enable for this connection. At the very least you will need to select the Account:Email and Account:Read permissions.

  2. Click Save.

  3. To get your Key and Secret, on the page that follows, click the name of your app under OAuth consumers to reveal your keys.

  4. Copy your Client Id and Client Secret into Auth0. In a separate window, log in to your Auth0 Dashboard and select Connections > Social in the left nav. Select Bitbucket:

  1. Copy the Key and Secret from the OAuth integrated applications page on Bitbucket into the fields on this page on Auth0. Select the Permissions you want to enable. Click SAVE.

  1. To enable the connection, go to the Apps tab of the Bitbucket connection on Auth0 and select each of your existing Auth0 apps for which you want to enable this connection.

How it works

Test the connection

  1. Close the Settings window to return to the Connections > Social section of the Auth0 dashboard.

A TRY icon will now be displayed next to the Bitbucket logo:

  1. Click TRY.

  2. Click Grant access to allow your app access. If you have configured everything correctly, you will see the It works! page.