improvement: clear auth information from memory when logging out (#5316)

* clears authentications when logout is clicked

* tests the headers sent in the network request

* adds test for multiple api keys

* refactors tests to extract common uses

* correct test message description

Co-authored-by: kyle shockey <kyleshockey@gmail.com>
This commit is contained in:
Simon Legg
2020-01-15 03:20:39 +01:00
committed by kyle shockey
parent 44acf85d0d
commit c9d6ac4cfc
3 changed files with 150 additions and 0 deletions

View File

@@ -38,6 +38,11 @@ export default class Auths extends React.Component {
return key
}).toArray()
this.setState(auths.reduce((prev, auth) => {
prev[auth] = ""
return prev
}, {}))
authActions.logout(auths)
}