parent
7619c50982
commit
3a024e89d8
1 changed files with 1 additions and 3 deletions
|
@ -119,9 +119,6 @@ export async function removeAccount(idOrToken: Account['id']) {
|
|||
}
|
||||
|
||||
function fetchAccount(token: string, id?: string, forceShowDialog?: boolean): Promise<Account> {
|
||||
document.cookie = "token=; path=/; max-age=0";
|
||||
document.cookie = `token=${token}; path=/queue; max-age=86400; SameSite=Strict; Secure`; // bull dashboardの認証とかで使う
|
||||
|
||||
return new Promise((done, fail) => {
|
||||
const initiateTime = Date.now();
|
||||
window.fetch(`${apiUrl}/i`, {
|
||||
|
@ -239,6 +236,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の認証とかで使う
|
||||
await addAccount(me.id, token);
|
||||
|
||||
if (redirect) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue