Harshit
Harshit•2mo ago

Issue with Bitbucket OAuth Integration in ZITADEL

Hi ZITADEL Team, I'm facing an issue while trying to integrate Bitbucket as an OAuth provider within ZITADEL. šŸ”§ Setup Details:- -OAuth Provider: Bitbucket (Cloud) -OAuth Type: Generic OAuth / External IDP -Redirect URI: Configured correctly as per Bitbucket and ZITADEL guidelines -Client ID/Secret: Verified from Bitbucket. After configuring Bitbucket as an external IDP in ZITADEL and initiating the OAuth flow: The authorization request is sent successfully to Bitbucket. Upon granting permission, Bitbucket redirects back to the callback URL with a valid authorization code. However, the token exchange request fails, and no user is created or logged in via Bitbucket. Observed Behavior:- -ZITADEL does not complete the login flow. -The logs (if any) are unclear or insufficient to debug. -A 401 or token-related error occurs when trying to redeem the authorization code.
No description
5 Replies
Rajat
Rajat•2mo ago
hey @Harshit thanks for your question, may I know what doc did you used to setup the idp?
Harshit
HarshitOP•2mo ago
As such no doc was available, but there was an option for configuring generic oauth in zitadel, so i asked the llm's about that, there i got the steps.
Rajat
Rajat•2mo ago
hey @Harshit what auth/token/user endpoint are you using from bit bucket? what scopes are you passing? I have a few too many questions šŸ™‚ try setting up the IDP via API https://zitadel.com/docs/apis/resources/mgmt/management-service-add-generic-o-auth-provider
Harshit
HarshitOP•4w ago
Rajat
Rajat•4w ago
hey @Harshit have you enabled auto creation and auto linking in zitadel we also have a doc on adding Linkedin as generic auth, maybe you can look into that and it may work for bitbucket https://zitadel.com/docs/guides/integrate/identity-providers/linkedin-oauth

Did you find this page helpful?