Open xfq opened 4 years ago
Should we define a permission model for MiniApps and corresponding APIs?
Related docs:
Spec: https://w3c.github.io/miniapp-manifest/#req_permissions-member
Specs:
Query a permission using the navigator.permissions.query() method to return a promise that resolves with the status for a specific API.
navigator.permissions.query()
Docs: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/permissions
permissions.request() asks for a set of permissions.
permissions.request()
Docs: https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/authorize.html
Use wx.getSetting to get the user's current permission settings (only for the permissions the Mini Program has requested before).
wx.getSetting
Use wx.authorize to ask for a set of permissions.
wx.authorize
Docs: https://microapp.bytedance.com/docs/zh-CN/mini-app/develop/api/other/user-authorization/
Use tt.getSetting to get the user's current permission settings (only for the permissions the Mini Program has requested before).
tt.getSetting
Use tt.authorize to ask for a set of permissions.
tt.authorize
I think it's needed.
Yeah, we could work on a new document to define common infrastructure that other specifications can use to interact with MiniApp permissions.
Should we define a permission model for MiniApps and corresponding APIs?
Related docs:
MiniApp Manifest
Spec: https://w3c.github.io/miniapp-manifest/#req_permissions-member
W3C
Web pages/applications
Specs:
Query a permission using the
navigator.permissions.query()
method to return a promise that resolves with the status for a specific API.Extensions
Docs: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/permissions
permissions.request()
asks for a set of permissions.WeChat Mini Programs
Docs: https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/authorize.html
Use
wx.getSetting
to get the user's current permission settings (only for the permissions the Mini Program has requested before).Use
wx.authorize
to ask for a set of permissions.ByteDance Mini Programs
Docs: https://microapp.bytedance.com/docs/zh-CN/mini-app/develop/api/other/user-authorization/
Use
tt.getSetting
to get the user's current permission settings (only for the permissions the Mini Program has requested before).Use
tt.authorize
to ask for a set of permissions.