Clear localForage database on logout

This commit is contained in:
Jori Lallo 2017-11-11 16:02:49 -08:00
parent 5f2ce6c281
commit 272cc158ea
1 changed files with 2 additions and 0 deletions

View File

@ -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: '/' });
};