Bitbucket

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

Integration Steps

Create a Bitbucket OAuth App

  1. Log in to your Bitbucket Workspaces account.
  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.stack-auth.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.

Enable Bitbucket OAuth in Stack Auth

  1. On the Stack Auth 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.

Need More Help?

Stack Auth AI

Documentation assistant

Experimental: AI responses may not always be accurate—please verify important details.

For the most accurate information, please join our Discord or email us.

How can I help?

Ask me about Stack Auth while you browse the docs.