This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The create() method of the CredentialsContainer interface returns a Promise that resolves with a new Credential instance based on the provided options, or null if no Credential object can be created.
This method is restricted to top-level contexts. Calls to it within an <iframe> element will resolve without effect.
var promise = CredentialsContainer.create([options])
CredentialCreationOptions that contains options for the requested new Credentials object. It must include one of the options "password", "federated", or "publicKey". The options are: HTMLFormElement, or a PasswordCredentialData object. TBD id: (required) USVString Inherited from CredentialData.name: Optional USVString TBDiconURL: Optional USVString TBDpassword: (required) USVString TBDFederatedCredentialInit object. Contains requirements for creating/obtaining federated credentials. The available options are: publicKey: Optional an PublicKeyCredentialCreationOptions object that describes the options for creating a WebAuthn credential.A Promise that resolves with a Credential instance, such as PasswordCredential, FederatedCredential, or PublicKeyCredential.
| Specification | Status | Comment |
|---|---|---|
| Credential Management Level 1 The definition of 'get()' in that specification. | 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 | 60 | 18 | ? | ? | No | ? |
| Mobile | |||||||
|---|---|---|---|---|---|---|---|
| Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
| Basic support | 60 | 60 | ? | ? | 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/create