Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dropbox_api.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ Gem::Specification.new do |spec|
spec.required_ruby_version = '>= 2.3'

spec.add_dependency 'faraday', '< 3.0'
spec.add_dependency 'oauth2', '~> 1.1'
spec.add_dependency 'oauth2', '~> 2.0'
end
6 changes: 5 additions & 1 deletion lib/dropbox_api/authenticator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ class Authenticator < OAuth2::Client
def initialize(client_id, client_secret)
super(client_id, client_secret, {
authorize_url: 'https://www.dropbox.com/oauth2/authorize',
token_url: 'https://api.dropboxapi.com/oauth2/token'
token_url: 'https://api.dropboxapi.com/oauth2/token',
# oauth2 2.0 defaults `auth_scheme` to `:basic_auth`, sending the
# client credentials in the Authorization header. Dropbox expects them
# in the request body, which was the oauth2 1.x default behaviour.
auth_scheme: :request_body
})
end
end
Expand Down