Re: [w3c/webpayments-payment-apps-api] Multiple payment apps per origin (#98)

> "Service workers can be identified by scope"
> This one has been an accepted truth in the Working Group for some time, but after reading the Service Workers specification, I have come to believe that this is not true.

It is true. See https://w3c.github.io/ServiceWorker/#register-algorithm - at 4 it gets an existing registration of that scope and updates it if it exists. This ensures you can't register two service workers with the same scope.

> The Service Worker does however have a unique id field

This isn't useful for payments. You don't want to associate an app with a service worker, you want to associate with a service worker registration, otherwise you'll lose payment apps during a service worker update.

> Even though current implementations may only allow for one Service Worker per scope, [this issue](https://github.com/w3c/ServiceWorker/issues/921) leads me to think that we should not assume this will always be the case.

If we do something about that issue, we won't be adding multiple registrations for a single scope. APIs already assume that scope to registration is 1:1, eg https://w3c.github.io/ServiceWorker/#navigator-service-worker-getRegistration.

-- 
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/webpayments-payment-apps-api/issues/98#issuecomment-280359151

Received on Thursday, 16 February 2017 15:18:59 UTC