summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-10-27 08:22:53 +0000
committerWinnie Hellmann <winnie@gitlab.com>2017-10-27 09:05:12 +0000
commit5ea63e7a1105a37e6ccebb5013975fefff0ba43a (patch)
tree6b2dd7b0c7ac491bfd23ff2fccb2d5c90b8fb96d
parent0938ec72e8343d8e9d05d1f646ebefadedd4928f (diff)
downloadgitlab-ce-5ea63e7a1105a37e6ccebb5013975fefff0ba43a.tar.gz
Merge branch '39495-fix-bitbucket-login' into 'master'
Fix bitbucket login Closes #39495 See merge request gitlab-org/gitlab-ce!15051 (cherry picked from commit a1aa4f00c27afdd3faf5a551b24bfe1555533a4d) 7d8eb4dd Fix bitbucket login
-rw-r--r--changelogs/unreleased/39495-fix-bitbucket-login.yml5
-rw-r--r--lib/omni_auth/strategies/bitbucket.rb4
2 files changed, 9 insertions, 0 deletions
diff --git a/changelogs/unreleased/39495-fix-bitbucket-login.yml b/changelogs/unreleased/39495-fix-bitbucket-login.yml
new file mode 100644
index 00000000000..b48d557108b
--- /dev/null
+++ b/changelogs/unreleased/39495-fix-bitbucket-login.yml
@@ -0,0 +1,5 @@
+---
+title: Fix bitbucket login
+merge_request: 15051
+author:
+type: fixed
diff --git a/lib/omni_auth/strategies/bitbucket.rb b/lib/omni_auth/strategies/bitbucket.rb
index 5a7d67c2390..ce1bdfe6ee4 100644
--- a/lib/omni_auth/strategies/bitbucket.rb
+++ b/lib/omni_auth/strategies/bitbucket.rb
@@ -36,6 +36,10 @@ module OmniAuth
email_response = access_token.get('api/2.0/user/emails').parsed
@emails ||= email_response && email_response['values'] || nil
end
+
+ def callback_url
+ options[:redirect_uri] || (full_host + script_name + callback_path)
+ end
end
end
end