This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Secure context
This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
The CredentialsContainer
interface of the the Credential Management API exposes methods to request credentials and notify the user agent when events such as successful sign in or sign out happen. This interface is accessible from Navigator.credentials
.
None.
None.
returns a Promise
which resolves with a Credential
if one can be created using the options provided, or null
if no Credential
can be created. In exceptional circumstances, the Promise
may reject.
CredentialsContainer.create()
Secure context
Promise
that resolves with a new Credential
instance based on the provided options, or null
if no Credential
object can be created.CredentialsContainer.get()
Secure context
Promise
that resolves with the Credential
instance that matches the provided parameters.CredentialsContainer.preventSilentAccess()
Secure context
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. Earlier versions of the spec called this method requireUserMediation()
. See Browser compatibility for support details.CredentialsContainer.store()
Secure context
Credential
instance and returns that instance in a Promise
.// TBD
Specification | Status | Comment |
---|---|---|
Credential Management Level 1 | Working Draft | Initial definition. |
Web Authentication: An API for accessing Public Key Credentials Level 1 | Candidate Recommendation | Initial definition. |
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | 51 | 18 | ? | ? | No | ? |
create
|
60 | 18 | ? | ? | No | ? |
get
|
51 | 18 | ? | ? | No | ? |
preventSilentAccess
|
60
|
? | ? | ? | No | ? |
store
|
51 | ? | ? | ? | No | ? |
Mobile | |||||||
---|---|---|---|---|---|---|---|
Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
Basic support | 51 | 51 | ? | ? | No | ? | ? |
create
|
60 | 60 | ? | ? | No | ? | ? |
get
|
51 | 51 | ? | ? | No | ? | ? |
preventSilentAccess
|
60
|
60
|
? | ? | No | ? | ? |
store
|
51 | 51 | ? | ? | No | ? | ? |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/CredentialsContainer