From e7ea62d6f315aedb12f06e35889f6d396acefd4c Mon Sep 17 00:00:00 2001 From: Nicolas Riesco Date: Wed, 6 Jun 2018 18:21:21 +0100 Subject: [PATCH] oauth2: rename cookie * Renamed cookie `db-connector-client-id` to `db-connector-oauth2-client-id`. --- app/components/Configuration.react.js | 2 +- app/components/Login.react.js | 2 +- backend/plugins/authorization.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/components/Configuration.react.js b/app/components/Configuration.react.js index 4fb09f617..dbb17d785 100644 --- a/app/components/Configuration.react.js +++ b/app/components/Configuration.react.js @@ -14,7 +14,7 @@ class Configuration extends Component { super(props); this.state = { authEnabled: (cookie.load('db-connector-auth-enabled') === 'true'), - clientId: cookie.load('db-connector-client-id'), + clientId: cookie.load('db-connector-oauth2-client-id'), isMenuOpen: false, username: cookie.load('db-connector-user') }; diff --git a/app/components/Login.react.js b/app/components/Login.react.js index 7fc78b931..b814d5c6d 100644 --- a/app/components/Login.react.js +++ b/app/components/Login.react.js @@ -25,7 +25,7 @@ class Login extends Component { constructor(props) { super(props); this.state = { - clientId: cookie.load('db-connector-client-id'), + clientId: cookie.load('db-connector-oauth2-client-id'), domain: (isOnPrem() ? plotlyUrl() : 'https://plot.ly'), statusMessage: '', serverType: CLOUD, diff --git a/backend/plugins/authorization.js b/backend/plugins/authorization.js index aa70c078c..69eaf1761 100644 --- a/backend/plugins/authorization.js +++ b/backend/plugins/authorization.js @@ -35,7 +35,7 @@ export function PlotlyOAuth(electron) { const clientId = process.env.PLOTLY_CONNECTOR_OAUTH2_CLIENT_ID || 'isFcew9naom2f1khSiMeAtzuOvHXHuLwhPsM7oPt'; - res.setCookie('db-connector-client-id', clientId, getUnsecuredCookieOptions()); + res.setCookie('db-connector-oauth2-client-id', clientId, getUnsecuredCookieOptions()); const authEnabled = getSetting('AUTH_ENABLED'); res.setCookie('db-connector-auth-enabled', authEnabled, getUnsecuredCookieOptions());