Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Commit

Permalink
Merge pull request #96 from mena-devs/update-omniauth
Browse files Browse the repository at this point in the history
Update omniauth
  • Loading branch information
constantine-nikolaou authored Jun 6, 2022
2 parents 25e6925 + 21ce229 commit 705fe86
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 3 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "bundler" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ gem 'meta-tags'
gem 'mini_racer'
gem 'nested_form'
gem 'omniauth-slack'
gem 'omniauth-rails_csrf_protection'
gem 'paranoia', '~> 2.2'
gem 'paperclip', '~> 5.2.0'
gem 'pg'
Expand Down
4 changes: 4 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@ GEM
omniauth-oauth2 (1.3.1)
oauth2 (~> 1.0)
omniauth (~> 1.2)
omniauth-rails_csrf_protection (0.1.2)
actionpack (>= 4.2)
omniauth (>= 1.3.1)
omniauth-slack (2.3.0)
omniauth-oauth2 (~> 1.3.1)
orm_adapter (0.5.0)
Expand Down Expand Up @@ -634,6 +637,7 @@ DEPENDENCIES
meta-tags
mini_racer
nested_form
omniauth-rails_csrf_protection
omniauth-slack
overcommit
paperclip (~> 5.2.0)
Expand Down
2 changes: 1 addition & 1 deletion app/views/devise/shared/_omniauthable.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%- if devise_mapping.omniauthable? %>
<%- resource_class.omniauth_providers.each do |provider| %>
<%= link_to(user_slack_omniauth_authorize_path) do %>
<%= link_to(user_slack_omniauth_authorize_path, method: :post) do %>
<!-- "Sign in with #{OmniAuth::Utils.camelize(provider)}" -->
<%= image_tag('https://platform.slack-edge.com/img/sign_in_with_slack.png',
alt: 'Sign in with Slack',
Expand Down
3 changes: 3 additions & 0 deletions config/initializers/omniauth.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Configure OmniAuth to only allow requests from :post and :get
OmniAuth.config.allowed_request_methods = [:post, :get]

if !AppSettings.slack_app_client_id.blank? && !AppSettings.slack_app_client_secret.blank?
Rails.application.config.middleware.use(OmniAuth::Builder) do
provider :slack,
Expand Down
4 changes: 2 additions & 2 deletions spec/requests/api/users_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

response '200', 'Return verified users' do
schema '$ref' => '#/components/schemas/users'

let!(:user) { create(:user) }
let!(:api_key) { create(:api_key, user: user) }
let!(:user_1) { create(:user) }
Expand Down Expand Up @@ -90,7 +90,7 @@
schema schema '$ref' => '#/components/schemas/users'

let!(:user) { create(:user) }
let!(:member) { create(:user) }
let!(:member) { create(:user, first_name: "find-user-test") }
let!(:api_key) { create(:api_key, user: user) }
let!("query[first_name]") { member.first_name }
let(:Authorization) { 'Bearer ' + api_key.access_token }
Expand Down

0 comments on commit 705fe86

Please sign in to comment.