Tie push subscriptions to current session
If a user logs out from a device the expectation should be that device no longer having any association with the user's account. Any existing push notifications should thefore be removed on server. For this reason tie push notifications to a session, and remove them when the session is deleted.
This commit is contained in:
parent
150cb82f5c
commit
52dfde95d1
7 changed files with 39 additions and 15 deletions
|
@ -8,9 +8,9 @@
|
|||
</nav>
|
||||
<div class="account">
|
||||
<template v-if="session?.account">
|
||||
{{ session?.account.name || "anonymous" }}
|
||||
(s:{{ session?.id }} a:{{ session?.account.id }})
|
||||
{{ session?.account.type }}
|
||||
{{ session.account.name || "anonymous" }}
|
||||
(s:{{ session.id }} a:{{ session.account.id }}{{ session.push ? " push" : null }})
|
||||
{{ session.account.type }}
|
||||
<button type="button" @click="logOut">Log out</button>
|
||||
</template>
|
||||
<template v-else>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue