diff --git a/app/controllers/settings_controller.rb b/app/controllers/settings_controller.rb index e365c3e29..de07ed8f2 100644 --- a/app/controllers/settings_controller.rb +++ b/app/controllers/settings_controller.rb @@ -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 diff --git a/config/routes.rb b/config/routes.rb index 0efac72c0..22773794c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -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'