mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-02 15:13:08 +02:00
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/468 Closes #445 Approved-by: Luna <her@mint.lgbt> Approved-by: Amelia Yukii <amelia.yukii@shourai.de>
This commit is contained in:
commit
66d8698ce4
1 changed files with 2 additions and 1 deletions
|
@ -43,6 +43,7 @@ export async function signout() {
|
||||||
waiting();
|
waiting();
|
||||||
miLocalStorage.removeItem('account');
|
miLocalStorage.removeItem('account');
|
||||||
await removeAccount($i.id);
|
await removeAccount($i.id);
|
||||||
|
document.cookie = `token=; path=/; max-age=0${ location.protocol === 'https:' ? '; Secure' : ''}`;
|
||||||
const accounts = await getAccounts();
|
const accounts = await getAccounts();
|
||||||
|
|
||||||
//#region Remove service worker registration
|
//#region Remove service worker registration
|
||||||
|
@ -200,7 +201,7 @@ export async function login(token: Account['token'], redirect?: string) {
|
||||||
throw reason;
|
throw reason;
|
||||||
});
|
});
|
||||||
miLocalStorage.setItem('account', JSON.stringify(me));
|
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);
|
await addAccount(me.id, token);
|
||||||
|
|
||||||
if (redirect) {
|
if (redirect) {
|
||||||
|
|
Loading…
Reference in a new issue