diff --git a/packages/frontend/src/account.ts b/packages/frontend/src/account.ts index 171826c9d8be2766b2ce471e57388a3e81fb1c82..90cc2e51c95982b9c58fc398e0bc39db51779200 100644 --- a/packages/frontend/src/account.ts +++ b/packages/frontend/src/account.ts @@ -43,6 +43,7 @@ export async function signout() { waiting(); miLocalStorage.removeItem('account'); await removeAccount($i.id); + document.cookie = `token=; path=/; max-age=0${ location.protocol === 'https:' ? '; Secure' : ''}`; const accounts = await getAccounts(); //#region Remove service worker registration @@ -200,7 +201,7 @@ export async function login(token: Account['token'], redirect?: string) { throw reason; }); miLocalStorage.setItem('account', JSON.stringify(me)); - document.cookie = `token=${token}; path=/; max-age=31536000`; // bull dashboardã®èªè¨¼ã¨ã‹ã§ä½¿ã† + document.cookie = `token=${token}; path=/; max-age=31536000${ location.protocol === 'https:' ? '; Secure' : ''}`; // bull dashboardã®èªè¨¼ã¨ã‹ã§ä½¿ã† await addAccount(me.id, token); if (redirect) {