CredentialsContainer.create()

Experimental

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.

Syntax

var promise = CredentialsContainer.create([options])

Parameters

options
An object of type CredentialCreationOptions that contains options for the requested new Credentials object. It must include one of the options "password", "federated", or "publicKey". The options are:

Returns

A Promise that resolves with a Credential instance, such as PasswordCredential, FederatedCredential, or PublicKeyCredential.

Specifications

Specification
Credential Management Level 1 (Credential Management 1)
# dom-credentialscontainer-create

Browser compatibility

BCD tables only load in the browser