Skip to content

Commit 5c214c6

Browse files
committed
Adding an option for callback_url
1 parent bda8447 commit 5c214c6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/omniauth/strategies/bitbucket.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ class Bitbucket < OmniAuth::Strategies::OAuth2
1111
:token_url => 'https://bitbucket.org/site/oauth2/access_token'
1212
}
1313

14+
# Leave this blank to use the redirect_uri you specified in your BitBucket
15+
# OAuth application settings
16+
option :callback_url
17+
1418
# These are called after authentication has succeeded. If
1519
# possible, you should try to set the UID without making
1620
# additional calls (if the user id is returned with the token
@@ -26,6 +30,10 @@ class Bitbucket < OmniAuth::Strategies::OAuth2
2630
}
2731
end
2832

33+
def callback_url
34+
options[:callback_url]
35+
end
36+
2937
def raw_info
3038
@raw_info ||= begin
3139
ri = MultiJson.decode(access_token.get('/api/1.0/user').body)['user']

0 commit comments

Comments
 (0)