forked from Trustie/forgeplus
fixed 第三方授权登录配置url
This commit is contained in:
parent
e41adbc4a8
commit
73d89a89e2
|
@ -76,11 +76,12 @@ class SettingsController < ApplicationController
|
|||
url: EducoderOauth.oauth_url,
|
||||
method: 'get'
|
||||
}
|
||||
platform_url = Rails.application.config_for(:configuration)['platform_url']
|
||||
config = Rails.application.config_for(:configuration)
|
||||
(config.dig("oauth").keys - ["educoder"]).each do |provider|
|
||||
@third_party_new << {
|
||||
name: provider,
|
||||
url: "/auth/#{provider}",
|
||||
url: "#{platform_url}/auth/#{provider}",
|
||||
method: 'post'
|
||||
}
|
||||
end
|
||||
|
|
|
@ -20,7 +20,7 @@ Rails.application.routes.draw do
|
|||
get 'attachments/download/:id', to: 'attachments#show'
|
||||
get 'attachments/download/:id/:filename', to: 'attachments#show'
|
||||
|
||||
get 'auth/qq/callback', to: 'oauth/qq#create'
|
||||
# get 'auth/qq/callback', to: 'oauth/qq#create'
|
||||
get 'auth/failure', to: 'oauth/base#auth_failure'
|
||||
get 'auth/cas/callback', to: 'oauth/cas#create'
|
||||
get 'auth/:provider/callback', to: 'oauth/callbacks#create'
|
||||
|
|
Loading…
Reference in New Issue