chronograf icon indicating copy to clipboard operation
chronograf copied to clipboard

Users should be able to logout

Open jaredscheib opened this issue 9 years ago • 5 comments

There's currently no way to do this via the UI. Sessions time out only via auth expiration. Thoughts?

jaredscheib avatar Apr 04 '17 19:04 jaredscheib

This used to be available, there was a user link in the bottom left.

nhaugo avatar Apr 04 '17 20:04 nhaugo

https://github.com/influxdata/chronograf/issues/565

nhaugo avatar Apr 04 '17 20:04 nhaugo

The server needs the following:

  1. a logout route /oauth/logout
  2. The logout route needs to look at the JWT's issuer and redirect (302) the user to the appropriate provider logout endpoint.

goller avatar Apr 05 '17 14:04 goller

@nhaugo Thanks. Turns out it's in the code, but isn't showing because its display logic hinges upon an ostensibly obsolete data shape, i.e. if the response from /me contains a email property. In my current session, after logging in with auth, my email appears under name, and there is no email key (and there will apparently never be, according to its current shape at chronograf.go. Hence no logout button.

@goller Just looked it up and found that we support an oauth/logout route currently in server/mux.go, and it issues a 307 (StatusTemporaryRedirect). That being said, I'm not sure I'm seeing a new (expired) cookie served anywhere in the chain, including within the Logout function (at server/logout.go) called by that route. Is that right? Maybe we ought to include something for /logout (and possibly /login) in our session timeout work at https://github.com/influxdata/chronograf/pull/1119 pre-merge?

jaredscheib avatar Apr 05 '17 23:04 jaredscheib

Spoke with @goller and he showed me where the auth is able to handle this in middleware, so we fixed it and included it in https://github.com/influxdata/chronograf/pull/1119.

jaredscheib avatar Apr 05 '17 23:04 jaredscheib