Skip to content

Commit

Permalink
explicitly specify auth_scheme for oauth2 v2+ support
Browse files Browse the repository at this point in the history
  • Loading branch information
nov committed Sep 27, 2022
1 parent f3f04b1 commit cb41704
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/omniauth/strategies/apple.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ class Apple < OmniAuth::Strategies::OAuth2
option :client_options,
site: 'https://appleid.apple.com',
authorize_url: '/auth/authorize',
token_url: '/auth/token'
token_url: '/auth/token',
auth_scheme: :request_body
option :authorize_params,
response_mode: 'form_post',
scope: 'email name'
Expand Down
4 changes: 4 additions & 0 deletions spec/omniauth/strategies/apple_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@
expect(subject.client.options[:token_url]).to eq('/auth/token')
end

it 'has correct auth_scheme' do
expect(subject.client.options[:auth_scheme]).to eq(:request_body)
end

describe 'overrides' do
context 'as strings' do
it 'should allow overriding the site' do
Expand Down

0 comments on commit cb41704

Please sign in to comment.