Bitbucket signs users in with their Atlassian-hosted Bitbucket account. It belongs on developer tools whose users host code there rather than on GitHub or GitLab.
Copy the redirect URI
In the Authdog console, select the project and environment, open Authentication > Providers, find Bitbucket, and click Enable. Copy the redirect URI shown in the form:
https://identity.authdog.com/api/v1/callback/<connectionId>Create the OAuth consumer
- Open your workspace settings on Bitbucket and select OAuth consumers.
- Select Add consumer.
- Name the consumer and set the Callback URL to the redirect URI from Authdog.
- Grant the Account: Read permission — enough to read the profile.
- Save, then copy the Key and Secret.
Configure Authdog
| Field | Value |
|---|---|
| Client ID | The client identifier from the provider |
| Client Secret | The client secret from the provider |
Save, then toggle the connection active.
What Bitbucket returns
Authdog requests the provider's default scopes and reads the profile from https://bitbucket.org/api/2.0/user.
The user endpoint returns the account UUID, username, display name, and avatar. Authdog links on the UUID, which survives username changes.
Bitbucket keeps email addresses on a separate endpoint and hides them unless the account permits it, so expect users with no email on their Authdog record.
Test it
- Open your environment's hosted sign-in page, or link to
https://identity.authdog.com/api/v1/signin/<connectionId>. - Select the Bitbucket button and complete the flow.
- Confirm the user appears under Users in the console with a Bitbucket identity linked.
Troubleshooting
| Symptom | Cause |
|---|---|
invalid_grant |
The consumer's callback URL differs from the one used at sign-in |
| Empty email | The Bitbucket account has no public email — expected behaviour |
| Redirect or callback URL error | The URI registered with the provider does not match Authdog's exactly |
| Works in one environment only | Each environment has its own connectionId, and so its own redirect URI to register |
Related
| Read | To learn how to |
|---|---|
| Connectors | Set up any other social provider |
| GitHub | Offer the developer identity most users already have |