mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-04 15:34:13 +00:00 
			
		
		
		
	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
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -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…
	
	Add table
		
		Reference in a new issue