From 47890b6d98228f26e6a3a073faad0bb6e7662391 Mon Sep 17 00:00:00 2001 From: Bucky Schwarz Date: Thu, 2 Jan 2020 12:18:48 -0800 Subject: [PATCH 1/2] fix: allow logging out when using Ouath --- CHANGELOG.md | 2 ++ ui/src/auth/Login.js | 22 ++++------------------ 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a16ffb0a..42fc8075a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ### Bug Fixes +1. [#5340](https://github.com/influxdata/chronograf/pull/5340): Allow logging out when using Oauth + ### Features ## v1.7.16 [2019-12-18] diff --git a/ui/src/auth/Login.js b/ui/src/auth/Login.js index 172ff933e..b1f99891f 100644 --- a/ui/src/auth/Login.js +++ b/ui/src/auth/Login.js @@ -8,22 +8,8 @@ import SplashPage from 'shared/components/SplashPage' const VERSION = process.env.npm_package_version -const Login = props => { - const { - authData: { - auth: {links, isAuthLoading}, - }, - } = props - - if (isAuthLoading) { - return - } - - const redirectTo = links && links.length === 1 && links[0].login - - if (redirectTo) { - window.location.href = redirectTo - +const Login = ({authData: {auth}}) => { + if (auth.isAuthLoading) { return } @@ -35,8 +21,8 @@ const Login = props => {

{VERSION} / Time-Series Data Visualization

- {links && - links.map(({name, login, label}) => ( + {auth.links && + auth.links.map(({name, login, label}) => ( Log in with {label} From fdab763e39fa578fb0fca9934d4ef5a5d010beec Mon Sep 17 00:00:00 2001 From: Bucky Schwarz Date: Wed, 8 Jan 2020 11:54:33 -0800 Subject: [PATCH 2/2] chore: update changelog and bump minor version to 1.7.17 --- CHANGELOG.md | 4 +++- server/swagger.json | 2 +- ui/package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42fc8075a..ad89b3d57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ -## v1.7.17 +## v1.8.0 + +## v1.7.17 [2020-01-08] ### Bug Fixes diff --git a/server/swagger.json b/server/swagger.json index 8625ad091..4b43e32a0 100644 --- a/server/swagger.json +++ b/server/swagger.json @@ -3,7 +3,7 @@ "info": { "title": "Chronograf", "description": "API endpoints for Chronograf", - "version": "1.7.16" + "version": "1.7.17" }, "schemes": ["http"], "basePath": "/chronograf/v1", diff --git a/ui/package.json b/ui/package.json index 2d2f61945..a3bd26148 100644 --- a/ui/package.json +++ b/ui/package.json @@ -1,6 +1,6 @@ { "name": "chronograf-ui", - "version": "1.7.16", + "version": "1.7.17", "private": false, "license": "AGPL-3.0", "description": "",