Clear storage after logout
This commit is contained in:
@@ -254,6 +254,7 @@ export const ClientProvider: FC<Props> = ({ children }) => {
|
||||
|
||||
const logout = useCallback(async () => {
|
||||
await client.logout(undefined, true);
|
||||
await client.clearStores();
|
||||
clearSession();
|
||||
setState({
|
||||
client: undefined,
|
||||
|
||||
@@ -84,7 +84,7 @@ export async function initClient(
|
||||
|
||||
const storeOpts = {} as ICreateClientOpts;
|
||||
|
||||
if (indexedDB && localStorage && !import.meta.env.DEV) {
|
||||
if (indexedDB && localStorage /*&& !import.meta.env.DEV*/) {
|
||||
storeOpts.store = new IndexedDBStore({
|
||||
indexedDB: window.indexedDB,
|
||||
localStorage,
|
||||
|
||||
Reference in New Issue
Block a user