Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

explicitly specify auth_scheme for oauth2 v2+ support #91

Merged
merged 1 commit into from
Sep 27, 2022
Merged
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
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