Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define a permission model? #117

Open
xfq opened this issue Jul 17, 2020 · 2 comments
Open

Define a permission model? #117

xfq opened this issue Jul 17, 2020 · 2 comments
Labels
security-tracker Group bringing to attention of security, or tracked by the security Group but not needing response. unknown/future spec

Comments

@xfq
Copy link
Member

xfq commented Jul 17, 2020

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.

@xfq xfq added the security-tracker Group bringing to attention of security, or tracked by the security Group but not needing response. label Jul 17, 2020
@zhangyongjing
Copy link
Contributor

I think it's needed.

@xfq
Copy link
Member Author

xfq commented Sep 15, 2021

Yeah, we could work on a new document to define common infrastructure that other specifications can use to interact with MiniApp permissions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
security-tracker Group bringing to attention of security, or tracked by the security Group but not needing response. unknown/future spec
Projects
None yet
Development

No branches or pull requests

2 participants