CredentialsContainer

The CredentialsContainer interface of 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. Available only in secure contexts.

MDN Reference

Functions

Link copied to clipboard
suspend fun create(options: CredentialCreationOptions = definedExternally): Credential?

The create() method of the CredentialsContainer interface creates a new credential, which can then be stored and later retrieved using the CredentialsContainer.get method.

Link copied to clipboard
fun createAsync(options: CredentialCreationOptions = definedExternally): Promise<Credential?>
Link copied to clipboard
suspend fun get(options: CredentialRequestOptions = definedExternally): Credential?

The get() method of the CredentialsContainer interface returns a Promise that fulfills with a single credential, which can then be used to authenticate a user to a website.

Link copied to clipboard
fun getAsync(options: CredentialRequestOptions = definedExternally): Promise<Credential?>
Link copied to clipboard
suspend fun preventSilentAccess()

The preventSilentAccess() method of the CredentialsContainer interface sets a flag that specifies whether automatic log in is allowed for future visits to the current origin, then returns a Promise that resolves to undefined.

Link copied to clipboard
suspend fun store(credential: Credential)

The store() method of the ``js-nolint store(credentials) `` - credentials - : A valid Credential instance.

Link copied to clipboard
fun storeAsync(credential: Credential): Promise<Void>