Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/.bundle/
/vendor/bundle/
/.yardoc
/Gemfile.lock
/_yardoc/
Expand Down
2 changes: 1 addition & 1 deletion lib/omniauth-mlh/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module OmniAuth
module MLH
VERSION = '4.1.0'
VERSION = '4.1.1'
end
end
6 changes: 3 additions & 3 deletions lib/omniauth/strategies/mlh.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ class MLH < OmniAuth::Strategies::OAuth2 # :nodoc:
option :name, :mlh

option :client_options, {
site: 'https://my.mlh.io',
authorize_url: 'oauth/authorize',
token_url: 'oauth/token',
site: 'https://www.mlh.com',
authorize_url: 'https://www.mlh.com/oauth/authorize',
Comment thread
erinosher marked this conversation as resolved.
Outdated
token_url: 'https://api.mlh.com/v4/oauth/token',
auth_scheme: :request_body # Change from basic auth to request body
}

Expand Down
2 changes: 1 addition & 1 deletion spec/omni_auth/mlh_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
RSpec.describe OmniAuth::MLH do
it 'has a version number' do
expect(OmniAuth::MLH::VERSION).not_to be_nil
expect(OmniAuth::MLH::VERSION).to eq('4.1.0')
expect(OmniAuth::MLH::VERSION).to eq('4.1.1')
end

it 'loads the MLH strategy' do
Expand Down
7 changes: 7 additions & 0 deletions spec/omni_auth/strategies/mlh_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
allow(strategy).to receive(:access_token).and_return(access_token)
end

describe 'client options' do
it 'uses the current MLH OAuth authorize and token endpoints' do
expect(strategy.options.client_options.authorize_url).to eq('https://www.mlh.com/oauth/authorize')
expect(strategy.options.client_options.token_url).to eq('https://api.mlh.com/v4/oauth/token')
end
end

shared_context 'with oauth response' do |response_data|
let(:oauth_response) do
instance_double(OAuth2::Response,
Expand Down