Re: [w3c/push-api] Pass removed subscriptions as a property of the `pushsubscriptionchange` event (#193)

Just came up with this situation:

* A browser/device (**not user**, every visited can subscribe to the push notifications) is subscribed
* We store UUID/subscription in IDB and send it to the server. On server use UUID is primary key
* On each page load we compare subscription from getSubscription() and the one in IDB -- if changed -- re-send to the server (or just always re-send)
* At some point user clears IDB data but doesn't revoke push permission / subscriptions
* Browser/device visits our website again but IDB is empty -- new UUID is being generated and subscription from getSubscription() is stored and sent to the server
* At this point the server has 2 UUID entries with the same subscription/endpoint
* Server sends a push notification and the browser/device receives 2 notifications

So, if an endpoint can be used by multiple/different users: how the server should distinguish between the same browser/device or other one?
How custom UUID (website generated) helps in this situation at all?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/push-api/issues/193#issuecomment-298270137

Received on Monday, 1 May 2017 01:13:54 UTC