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

Commit 517f9c4

Browse files
Update config files related to omniauth
1 parent 1d48ce5 commit 517f9c4

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

app/views/devise/shared/_omniauthable.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<%- if devise_mapping.omniauthable? %>
22
<%- resource_class.omniauth_providers.each do |provider| %>
3-
<%= link_to(user_slack_omniauth_authorize_path) do %>
3+
<%= link_to(user_slack_omniauth_authorize_path, method: :post) do %>
44
<!-- "Sign in with #{OmniAuth::Utils.camelize(provider)}" -->
55
<%= image_tag('https://platform.slack-edge.com/img/sign_in_with_slack.png',
66
alt: 'Sign in with Slack',

config/initializers/omniauth.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Configure OmniAuth to only allow requests from :post and :get
2+
OmniAuth.config.allowed_request_methods = [:post, :get]
3+
14
if !AppSettings.slack_app_client_id.blank? && !AppSettings.slack_app_client_secret.blank?
25
Rails.application.config.middleware.use(OmniAuth::Builder) do
36
provider :slack,

0 commit comments

Comments
 (0)