1 Commits
Author SHA1 Message Date
Max Freedom Pollard bedf5640fd fix(bitbucket): send redirect_uri on the authorize hop
generate_bitbucket_authorize_url() takes a redirect_uri and leaves it
out of the query string, so Bitbucket returns the user to whatever
callback is registered on the OAuth consumer rather than the one the
panel asked for. complete_bitbucket_callback() then posts that same
redirect_uri to the token endpoint, so the two halves of one flow name
different callbacks.

Both sibling generators in the same file send it
(generate_github_authorize_url line 207, generate_gitlab_authorize_url
line 446), as does generate_auth_url in sso_service.py; Bitbucket was
the only one that dropped it. GET /source-connections/bitbucket/authorize
already rejects a request without redirect_uri, so the value was always
present and always discarded.

Adds the parameter, plus a regression test parametrised over all three
providers so the next one added is held to the same contract.
2026-09-07 06:12:48 -04:00