fix(api): Ensure everything is cleared on logout
This commit is contained in:
		
							parent
							
								
									195593ddc5
								
							
						
					
					
						commit
						1c452e23fe
					
				| 
						 | 
					@ -4,7 +4,7 @@ import { AxiosResponse } from 'axios';
 | 
				
			||||||
import { api } from '../internal';
 | 
					import { api } from '../internal';
 | 
				
			||||||
import { defineStore } from 'pinia';
 | 
					import { defineStore } from 'pinia';
 | 
				
			||||||
import { PersistentStorage } from '../utils/persistent';
 | 
					import { PersistentStorage } from '../utils/persistent';
 | 
				
			||||||
 | 
					import { LocalStorage, SessionStorage } from 'quasar';
 | 
				
			||||||
function reviveSession() {
 | 
					function reviveSession() {
 | 
				
			||||||
  return PersistentStorage.get<FG.Session>('fg_session').then((s) => fixSession(s || undefined));
 | 
					  return PersistentStorage.get<FG.Session>('fg_session').then((s) => fixSession(s || undefined));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -154,6 +154,8 @@ export const useMainStore = defineStore({
 | 
				
			||||||
    handleLoggedOut() {
 | 
					    handleLoggedOut() {
 | 
				
			||||||
      this.$reset();
 | 
					      this.$reset();
 | 
				
			||||||
      void clearPersistant();
 | 
					      void clearPersistant();
 | 
				
			||||||
 | 
					      LocalStorage.clear();
 | 
				
			||||||
 | 
					      SessionStorage.clear();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue