Merge commit from fork
* fix(account): clear token cookie when signout called * fix: cookie not cleared correctly when logout Co-authored-by: おさむのひと <46447427+samunohito@users.noreply.github.com> * feat: clear only token cookie when signout --------- Co-authored-by: おさむのひと <46447427+samunohito@users.noreply.github.com>
This commit is contained in:
parent
77e421029c
commit
ba9f295ef2
|
@ -41,6 +41,12 @@ export async function signout() {
|
|||
if (!$i) return;
|
||||
|
||||
waiting();
|
||||
document.cookie.split(';').forEach((cookie) => {
|
||||
const cookieName = cookie.split('=')[0].trim();
|
||||
if (cookieName === 'token') {
|
||||
document.cookie = `${cookieName}=; max-age=0; path=/`;
|
||||
}
|
||||
});
|
||||
miLocalStorage.removeItem('account');
|
||||
await removeAccount($i.id);
|
||||
const accounts = await getAccounts();
|
||||
|
|
Loading…
Reference in New Issue