Skip to content

Commit a311097

Browse files
committed
add :expires_in & :prompt as auth options
1 parent ce5b195 commit a311097

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

example/config.ru

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ use Rack::Session::Cookie
2222

2323
use OmniAuth::Builder do
2424
provider :fitbit_oauth2, ENV['FITBIT_CLIENT_ID'], ENV['FITBIT_CLIENT_SECRET'],
25-
:scope => 'profile activity sleep'
25+
:scope => 'profile activity sleep', :expires_in => '2592000',
26+
:prompt => 'login'
2627
end
2728

2829
run App.new

lib/omniauth/strategies/fitbit_oauth2.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class FitbitOauth2 < OmniAuth::Strategies::OAuth2
1313
:token_url => 'https://api.fitbit.com/oauth2/token'
1414
}
1515

16-
option :authorize_options, [:scope, :response_type]
16+
option :authorize_options, [:scope, :response_type, :expires_in, :prompt]
1717
option :response_type, 'code'
1818

1919
def build_access_token

0 commit comments

Comments
 (0)