CredentialsContainer

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.

Properties

None.

Event handlers

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.

Methods

CredentialsContainer.create()Secure context
Returns a 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
Returns a Promise that resolves with the Credential instance that matches the provided parameters.
CredentialsContainer.preventSilentAccess()Secure context
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. Earlier versions of the spec called this method requireUserMediation(). See Browser compatibility for support details.
CredentialsContainer.store()Secure context
Stores a set of credentials for a user, inside a provided Credential instance and returns that instance in a Promise.

Examples

// TBD

Specifications

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.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Basic support
Experimental
Chrome Full support 51Edge Full support 18Firefox ? IE ? Opera No support NoSafari ? WebView Android Full support 51Chrome Android Full support 51Edge Mobile ? Firefox Android ? Opera Android No support NoSafari iOS ? Samsung Internet Android ?
create
Experimental
Chrome Full support 60Edge Full support 18Firefox ? IE ? Opera No support NoSafari ? WebView Android Full support 60Chrome Android Full support 60Edge Mobile ? Firefox Android ? Opera Android No support NoSafari iOS ? Samsung Internet Android ?
get
Experimental
Chrome Full support 51Edge Full support 18Firefox ? IE ? Opera No support NoSafari ? WebView Android Full support 51Chrome Android Full support 51Edge Mobile ? Firefox Android ? Opera Android No support NoSafari iOS ? Samsung Internet Android ?
preventSilentAccess
Experimental
Chrome Full support 60
Full support 60
No support 51 — 60
Alternate Name
Alternate Name Uses the non-standard name: requireUserMediation
Edge ? Firefox ? IE ? Opera No support NoSafari ? WebView Android Full support 60
Full support 60
No support 51 — 60
Alternate Name
Alternate Name Uses the non-standard name: requireUserMediation
Chrome Android Full support 60
Full support 60
No support 51 — 60
Alternate Name
Alternate Name Uses the non-standard name: requireUserMediation
Edge Mobile ? Firefox Android ? Opera Android No support NoSafari iOS ? Samsung Internet Android ?
store
Experimental
Chrome Full support 51Edge ? Firefox ? IE ? Opera No support NoSafari ? WebView Android Full support 51Chrome Android Full support 51Edge Mobile ? Firefox Android ? Opera Android No support NoSafari iOS ? Samsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.
Uses a non-standard name.
Uses a non-standard name.

Document Tags and Contributors

Last updated by: lwassermann,