From b689afb424653e0a673d63582a1d5eac715ecb1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=85kre=20Solberg?= Date: Wed, 3 Jan 2018 09:42:34 +0100 Subject: [PATCH] Set default clientid --- src/components/ServerConfigInput.jsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/ServerConfigInput.jsx b/src/components/ServerConfigInput.jsx index 153f5b3..379a1e8 100644 --- a/src/components/ServerConfigInput.jsx +++ b/src/components/ServerConfigInput.jsx @@ -26,7 +26,7 @@ class Component extends PureComponent { // console.log("currentURL", currentURL) this.state = { - // clientId: "6233aedf-f08a-4112-9a1b-f33c3cd9b396", + clientId: "6233aedf-f08a-4112-9a1b-f33c3cd9b396", // clientSecret: "", redirectURL: currentURL, // scopes: "", @@ -37,7 +37,7 @@ class Component extends PureComponent { authenticateStart() { let config = Object.assign({}, this.props.serverConfig, this.state) - // console.error("Authenticate", config, this.props.serverConfig, this.state) + this.props.authenticateStart(config) } @@ -76,8 +76,10 @@ class Component extends PureComponent { } let clientId = '' - if (this.props.serverConfig) { + if (this.props.serverConfig && this.props.serverConfig.client_id) { clientId = this.props.serverConfig.client_id + } else if (this.state && this.state.clientId) { + clientId = this.state.clientId } let clientSecret = '' -- GitLab