diff options
author | Jarka Kadlecova <jarka@gitlab.com> | 2017-10-26 13:59:28 +0300 |
---|---|---|
committer | Jarka Kadlecova <jarka@gitlab.com> | 2017-10-26 17:14:32 +0300 |
commit | 7d8eb4ddb09f96fe19722476144d73d32228f3a8 (patch) | |
tree | 81091d6c3e763cd61f3f99ce226924c0bf3ebfcf | |
parent | 3ddffec0d62146e27298a982a7d2935dbe518fb9 (diff) |
Fix bitbucket login
-rw-r--r-- | changelogs/unreleased/39495-fix-bitbucket-login.yml | 5 | ||||
-rw-r--r-- | lib/omni_auth/strategies/bitbucket.rb | 4 |
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 |