RESOLVED WONTFIX 243389
Extensions Manifest geolocation permission not respected
https://bugs.webkit.org/show_bug.cgi?id=243389
Summary Extensions Manifest geolocation permission not respected
Michael Flores
Reported 2022-07-31 09:44:13 PDT
When adding the "geolocation" permission to Web Application Manifest for a Safari Web Extension, the browser should treat this as an explicit permission grant to allow user's to seamlessly take advantage of location-based functionality. Instead, Safari presents the same permission prompt at least once per day as if the permission hadn't been declared. This contrasts with Chromium browsers, where it is treated as a permission grant and allows use of navigator.geolocation.getCurrentPosition() without displaying an additional permission prompt.
Attachments
Michael Flores
Comment 1 2022-07-31 09:48:36 PDT
The impact of this is exacerbated by the inability to check if geolocation permission was granted on Safari due to lack of Permissions API support in Safari 15.
Marcos Caceres
Comment 2 2022-07-31 22:23:46 PDT
Hi Micheal, (In reply to Michael Flores from comment #0) > When adding the "geolocation" permission to Web Application Manifest for a > Safari Web Extension, the browser should treat this as an explicit > permission grant to allow user's to seamlessly take advantage of > location-based functionality. Instead, Safari presents the same permission > prompt at least once per day as if the permission hadn't been declared. This > contrasts with Chromium browsers, where it is treated as a permission grant > and allows use of navigator.geolocation.getCurrentPosition() without > displaying an additional permission prompt. Unlike Chrome, Safari doesn't allow long-lived permission grants for Geolocation (i.e., it's the expected behavior to keep users location private by default as much as possible). (In reply to Michael Flores from comment #1) > The impact of this is exacerbated by the inability to check if geolocation > permission was granted on Safari due to lack of Permissions API support in > Safari 15. Right. Although I don't if/when know when the Permission API will be available in Safari by default, it has been partially implemented. To enable it in Safari, open menu Developer > Experimental Features > Permissions API (it doesn't quite work yet... but it's getting there :)). To track implementation of the Permissions API: https://bugs.webkit.org/show_bug.cgi?id=229504
Michael Flores
Comment 3 2022-07-31 22:39:28 PDT
Thank you for the response Marcos. I know this is sort of set in stone, but I just want to register a respectful dissent here. Native applications are allowed to request a one-time permission for location and seamlessly utilize that permission thereafter. Chrome allows informed user consent to geolocation at the time of installation of an extension. Safari extensions are at a disadvantage here: an extension can declare in manifest that it uses geolocation, but the use of this permission won't be shown prior to install or allow a consent at install, and thereafter once per day (at best, if a user checks the box) a user will have to re-consent. For something like a weather widget for example, it's a rather non-ideal UX. I understand you're saying the intent is to keep it private as much as possible, but put next to how native applications are treated in macOS it doesn't quite square. Either macOS applications are less private than Safari extensions or Safari is overbearing here. Hopefully this can be revised or improved in the future.
Marcos Caceres
Comment 4 2022-07-31 22:48:51 PDT
(In reply to Michael Flores from comment #3) > Thank you for the response Marcos. I know this is sort of set in stone, but > I just want to register a respectful dissent here. Appreciate that. Note that nothing is set in stone. Always happy to re-evaluate based on new information. > Native applications are > allowed to request a one-time permission for location and seamlessly utilize > that permission thereafter. Chrome allows informed user consent to > geolocation at the time of installation of an extension. Safari extensions > are at a disadvantage here: an extension can declare in manifest that it > uses geolocation, but the use of this permission won't be shown prior to > install or allow a consent at install, and thereafter once per day (at best, > if a user checks the box) a user will have to re-consent. For something like > a weather widget for example, it's a rather non-ideal UX. Understood. But you are describing something different here: browser extensions are primarily supposed to interact with the page. What you are describing is a separate kind of application (widget). Access to geolocation should have very specific purpose, and even then, it's desirable to ask for permission. I can imagine there might be applications that could in theory update various parts based on the user changing location - but it's also ok to ask. > I understand > you're saying the intent is to keep it private as much as possible, but put > next to how native applications are treated in macOS it doesn't quite > square. Right, but these (macOS and Safari) are separate environments. They have different expectations. > Either macOS applications are less private than Safari extensions or > Safari is overbearing here. Hopefully this can be revised or improved in the > future. Thanks. I'll pass this feedback to the extensions team.
Note You need to log in before you can comment on or make changes to this bug.