Skip to content

Commit

Permalink
fixup! real logout
Browse files Browse the repository at this point in the history
  • Loading branch information
KhafraDev committed Jun 27, 2024
1 parent a3f9d63 commit 37da888
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,7 @@ export async function handleLogin () {
}

async function logout () {
if ('cookieStore' in window) {
await (window.cookieStore as { delete: (id: string) => Promise<void> }).delete('id')
} else {
document.cookie = 'id=; Max-Age=0'
}

await fetch('https://synergism.cc/api/v1/users/logout')
await Alert(i18next.t('account.logout'))

location.reload()
Expand Down

0 comments on commit 37da888

Please sign in to comment.