Docs

You are viewing an archived version of the docs.Go to latest version

Bitbucket

How to set up social connection with Bitbucket

Overview

Adding social connection with Bitbucket to your app with Clerk is done in a few steps - you will need to populate the Client ID, Client Secret and Authorized redirect URI in your instance settings.

To make the development flow as smooth as possible, Clerk uses preconfigured shared OAuth credentials and redirect URIs for development instances - no other configuration is needed.

For production instances, you will need to generate your own Consumer Key and Consumer Secret using your Bitbucket account.

The purpose of this guide is to help you create a Bitbucket account and a Bitbucket OAuth Consumer - if you're looking for step-by-step instructions using Clerk to add social connection (OAuth) to your application, follow the Social connection (OAuth) guide.

Before you start

Configuring Bitbucket social connection

Firstly, you will need to have a Bitbucket workspace.

You can navigate to the list of all your workspaces to select an existing workspace or create a new one:

Bitbucket workspace listing

From there, click on the desired existing workspace or create a new one, then navigate to:

Settings > Oauth Consumers

Bitbucket OAuth Consumer list

You will need to create a consumer if you don't have one already.

The first important setting for the connection to work is the Callback URL. Paste the Authorized redirect URI from your Clerk Bitbucket settings in this field:

OAuth consumer creation

The rest of the form fields (Name, Description, URL, Privacy Policy URL, EULA URL) can be set to match your application settings.

The second important setting is the selection of scopes that Clerk should request from Bitbucket upon connecting.

Bitbucket OAuth Consumer scopes

Under Account, the Email & Read scopes should be enabled so that Clerk can use your basic Bitbucket account info when creating your Clerk user.

After saving the Oauth Consumer, Bitbucket will generate a Consumer Key and Consumer Secret for you. These can be displayed by clicking on the Consumer entry in your OAuth Consumer list.

You will need to copy:

  • The Bitbucket Client Key to the Client ID input on Clerk
  • The Bitbucket Client Secret to the Client Secret input on Clerk
Client ID and Client Secret inputs for Bitbucket connection

Congratulations! Social connection with Bitbucket is now configured for your instance.

Feedback

What did you think of this content?

Last updated on