flotilla/src/app/session.ts

16 lines
349 B
TypeScript
Raw Normal View History

2026-03-24 00:51:51 +00:00
import {db, kv, ss} from "@app/core/storage"
2026-06-08 21:14:40 +00:00
import {deactivateCurrentPomadeSession} from "@app/pomade"
import {Push} from "@app/push"
2026-03-05 22:20:20 +00:00
export const logout = async () => {
await deactivateCurrentPomadeSession()
2026-03-05 22:20:20 +00:00
await Push.disable()
await kv.clear()
2026-03-24 00:51:51 +00:00
await ss.clear()
2026-03-05 22:20:20 +00:00
await db.clear()
localStorage.clear()
window.location.href = "/"
}