Skip to content
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.bundle
Gemfile.lock
coverage
reports
reports
5 changes: 5 additions & 0 deletions lib/omniauth/strategies/bigcommerce.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ def authorize_params
end
end
end

#Exclude query string in callback
def callback_url
full_host + script_name + callback_path
end
end
end
end
Expand Down
11 changes: 11 additions & 0 deletions spec/omniauth/strategies/bigcommerce_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,17 @@
it 'should have the correct path' do
expect(subject.callback_path).to eq('/auth/bigcommerce/callback')
end

it 'should use no query string for callback url' do
request = double('Request', :params => {}, :cookies => {}, :env => {})
allow(request).to receive(:scheme).and_return('http')
allow(request).to receive(:url).and_return('http://example.com')

allow(subject).to receive(:request).and_return(request)
allow(subject).to receive(:script_name).and_return('')

subject.callback_url
end
end

context 'authorize options' do
Expand Down