Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The get()
method of the CredentialsContainer
interface returns a Promise
to a single Credential
instance that matches the provided parameters. If no match is found the Promise will resolve to null.
This method first collects all credentials in the CredentialsContainer
that meet the necessary criteria (defined in the options
argument). From the resulting set of credentials, it then selects the best one. Depending on the options, it may display a dialog to the user and ask the user to make the selection.
This method collects credentials by calling the "CollectFromCredentialStore" method for each credential type allowed by the options
argument. For example: if options.password exists, then the PasswordCredential
.[[CollectFromCredentialStore]] is called.
Note: This method is restricted to top-level contexts. Calls to it within an <iframe>
element will resolve without effect.