Browse Source

fixed 第三方授权登录配置支持Get方法

pull/313/head
xxq250 3 years ago
parent
commit
1aab51104f
2 changed files with 2 additions and 1 deletions
  1. +1
    -1
      app/controllers/settings_controller.rb
  2. +1
    -0
      config/initializers/omniauth.rb

+ 1
- 1
app/controllers/settings_controller.rb View File

@@ -82,7 +82,7 @@ class SettingsController < ApplicationController
@third_party_new << { @third_party_new << {
name: provider, name: provider,
url: "#{platform_url}/auth/#{provider}", url: "#{platform_url}/auth/#{provider}",
method: 'post'
method: 'get'
} }
end end
end end


+ 1
- 0
config/initializers/omniauth.rb View File

@@ -5,6 +5,7 @@ OmniAuth.config.add_camelization 'qq', 'QQ' if config.dig("oauth", "qq")
# OmniAuth.config.add_camelization 'gitee', 'Gitee' if config.dig("oauth", "gitee") # OmniAuth.config.add_camelization 'gitee', 'Gitee' if config.dig("oauth", "gitee")
# OmniAuth.config.add_camelization 'wechat', 'Wechat' if config.dig("oauth", "wechat") # OmniAuth.config.add_camelization 'wechat', 'Wechat' if config.dig("oauth", "wechat")
OmniAuth.config.logger = Rails.logger OmniAuth.config.logger = Rails.logger
OmniAuth.config.allowed_request_methods = %i[get post]
OmniAuth.config.before_request_phase = nil OmniAuth.config.before_request_phase = nil
OmniAuth.config.before_callback_phase = nil OmniAuth.config.before_callback_phase = nil
OmniAuth.config.on_failure = Proc.new { |env| OmniAuth.config.on_failure = Proc.new { |env|


Loading…
Cancel
Save