From 9b50b5028391ee29922ad5549b785ac2312be368 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Wed, 3 Aug 2016 19:32:06 -0400 Subject: Hardcode preset OAuth2 endpoints when saving the config from the System Console (#3722) --- webapp/components/admin_console/oauth_settings.jsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'webapp') diff --git a/webapp/components/admin_console/oauth_settings.jsx b/webapp/components/admin_console/oauth_settings.jsx index ba03168ad..61a0dd156 100644 --- a/webapp/components/admin_console/oauth_settings.jsx +++ b/webapp/components/admin_console/oauth_settings.jsx @@ -43,9 +43,9 @@ export default class OAuthSettings extends AdminSettings { config.GoogleSettings.Enable = true; config.GoogleSettings.Id = this.state.id; config.GoogleSettings.Secret = this.state.secret; - config.GoogleSettings.UserApiEndpoint = this.state.userApiEndpoint; - config.GoogleSettings.AuthEndpoint = this.state.authEndpoint; - config.GoogleSettings.TokenEndpoint = this.state.tokenEndpoint; + config.GoogleSettings.UserApiEndpoint = 'https://www.googleapis.com/plus/v1/people/me'; + config.GoogleSettings.AuthEndpoint = 'https://accounts.google.com/o/oauth2/v2/auth'; + config.GoogleSettings.TokenEndpoint = 'https://www.googleapis.com/oauth2/v4/token'; config.GoogleSettings.Scope = 'profile email'; } @@ -53,9 +53,9 @@ export default class OAuthSettings extends AdminSettings { config.Office365Settings.Enable = true; config.Office365Settings.Id = this.state.id; config.Office365Settings.Secret = this.state.secret; - config.Office365Settings.UserApiEndpoint = this.state.userApiEndpoint; - config.Office365Settings.AuthEndpoint = this.state.authEndpoint; - config.Office365Settings.TokenEndpoint = this.state.tokenEndpoint; + config.Office365Settings.UserApiEndpoint = 'https://graph.microsoft.com/v1.0/me'; + config.Office365Settings.AuthEndpoint = 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize'; + config.Office365Settings.TokenEndpoint = 'https://login.microsoftonline.com/common/oauth2/v2.0/token'; config.Office365Settings.Scope = 'User.Read'; } -- cgit v1.2.3-1-g7c22