这是 实验性技术
检查 浏览器兼容性表格 要小心谨慎在生产中使用这之前。

preventSilentAccess() 方法在 CredentialsContainer interface sets a flag that specifies whether automatic log in is allowed for future visits to the current origin, then returns an empty Promise . For example, you might call this, after a user signs out of a website to ensure that he/she isn't automatically signed in on the next site visit. Mediation varies by origin, and is an added check point of browser stored credentials, informing a user of an account login status. This method is typically called after a user signs out of a website, ensuring this user's login information is not automatically passed on the next site visit.

Earlier versions of the spec called this method requireUserMediation() 。见 浏览器兼容性 for support details.

句法

var Promise = CredentialsContainer.preventSilentAccess()
					

参数

None.

返回

Promise .

规范

规范 状态 注释
Credential Management Level 1
The definition of 'preventSilentAccess()' in that specification.
工作草案 初始定义。

浏览器兼容性

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
preventSilentAccess Chrome 60
60
51 — 60 Alternate Name
Alternate Name Uses the non-standard name: requireUserMediation
Edge ≤79 Firefox Yes IE ? Opera 不支持 No Safari ? WebView Android 60
60
51 — 60 Alternate Name
Alternate Name Uses the non-standard name: requireUserMediation
Chrome Android 60
60
51 — 60 Alternate Name
Alternate Name Uses the non-standard name: requireUserMediation
Firefox Android Yes Opera Android 不支持 No Safari iOS ? Samsung Internet Android 8.0
8.0
5.0 — 8.0 Alternate Name
Alternate Name Uses the non-standard name: requireUserMediation

图例

完整支持

完整支持

不支持

不支持

兼容性未知 ?

兼容性未知

实验。期望将来行为有所改变。

实验。期望将来行为有所改变。

使用非标名称。

使用非标名称。

元数据

  • 最后修改:
  1. CredentialsContainer
  2. 方法
    1. create()
    2. get()
    3. preventSilentAccess()
    4. store()

版权所有  © 2014-2026 乐数软件    

工业和信息化部: 粤ICP备14079481号-1