diff --git a/endpoints/common.py b/endpoints/common.py index 1fa5ae522..6a221bd5c 100644 --- a/endpoints/common.py +++ b/endpoints/common.py @@ -180,10 +180,7 @@ def render_page_template(name, **kwargs): def get_oauth_config(): oauth_config = {} for oauth_app in oauth_apps: - oauth_config[oauth_app.key_name] = { - 'CLIENT_ID': oauth_app.client_id(), - 'AUTHORIZE_ENDPOINT': oauth_app.authorize_endpoint() - } + oauth_config[oauth_app.key_name] = oauth_app.get_public_config() return oauth_config diff --git a/static/js/app.js b/static/js/app.js index 3e4ea32e9..b3f655ed9 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -1727,6 +1727,8 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading keyService['githubLoginUrl'] = oauth['GITHUB_LOGIN_CONFIG']['AUTHORIZE_ENDPOINT']; keyService['googleLoginUrl'] = oauth['GOOGLE_LOGIN_CONFIG']['AUTHORIZE_ENDPOINT']; + keyService['githubEndpoint'] = oauth['GITHUB_LOGIN_CONFIG']['GITHUB_ENDPOINT']; + keyService['githubTriggerAuthorizeUrl'] = oauth['GITHUB_LOGIN_CONFIG']['AUTHORIZE_ENDPOINT']; keyService['githubLoginScope'] = 'user:email'; diff --git a/static/js/controllers.js b/static/js/controllers.js index 3a44a0e3c..07041ae7a 100644 --- a/static/js/controllers.js +++ b/static/js/controllers.js @@ -1738,6 +1738,7 @@ function UserAdminCtrl($scope, $timeout, $location, ApiService, PlanService, Use if (login.service == 'github') { $scope.hasGithubLogin = true; $scope.githubLogin = login.metadata['service_username']; + $scope.githubEndpoint = KeyService['githubEndpoint']; } if (login.service == 'google') { diff --git a/static/partials/user-admin.html b/static/partials/user-admin.html index a51119531..3493702df 100644 --- a/static/partials/user-admin.html +++ b/static/partials/user-admin.html @@ -176,7 +176,7 @@