From 272cc158ea1d0e4d5d8ec106377818e124a3fc4c Mon Sep 17 00:00:00 2001 From: Jori Lallo Date: Sat, 11 Nov 2017 16:02:49 -0800 Subject: [PATCH] Clear localForage database on logout --- app/stores/AuthStore.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/stores/AuthStore.js b/app/stores/AuthStore.js index 5cb7bf948..5bb7e7fc5 100644 --- a/app/stores/AuthStore.js +++ b/app/stores/AuthStore.js @@ -2,6 +2,7 @@ import { observable, action, computed, autorun } from 'mobx'; import invariant from 'invariant'; import Cookie from 'js-cookie'; +import localForage from 'localforage'; import { client } from 'utils/ApiClient'; import type { User, Team } from 'types'; @@ -37,6 +38,7 @@ class AuthStore { logout = () => { this.user = null; this.token = null; + localForage.clear(); Cookie.remove('loggedIn', { path: '/' }); };