mirror of
https://github.com/paricafe/misskey.git
synced 2024-12-27 00:06:44 -06:00
frontend: account.ts cache age
This commit is contained in:
parent
1c92225944
commit
0d022d8eb2
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
@ -213,7 +214,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) {
|
||||
|
|
Loading…
Reference in a new issue