Clear persistent storage on login and logout

Make sure that we don't end up with sensitive data sitting around in the stores
from a previous session.
This commit is contained in:
Richard van der Hoff 2017-05-31 17:28:46 +01:00
parent 939f6d0798
commit 68e1a7be74
2 changed files with 71 additions and 38 deletions

View file

@ -1228,6 +1228,8 @@ module.exports = React.createClass({
onReturnToGuestClick: function() {
// reanimate our guest login
if (this.state.guestCreds) {
// TODO: this is probably a bit broken - we don't want to be
// clearing storage when we reanimate the guest creds.
Lifecycle.setLoggedIn(this.state.guestCreds);
this.setState({guestCreds: null});
}