PublicKeyCredential

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The PublicKeyCredential interface provides information about a public key / private key pair. It inherits from Credential, and was created by the Web Authentication API extension to the Credential Management API. Other interfaces that inherit from Credential are PasswordCredential and FederatedCredential.

Properties

PublicKeyCredential.type Read only
Inherited from Credential. Always set to "public-key" for PublicKeyCredentials.
PublicKeyCredential.id Read only
Inherited from Credential and overridden to be the base64url encoding of PublicKeyCredential.rawId.
PublicKeyCredential.rawId Read only
An ArrayBuffer that holds the globally unique identifier for this PublicKeyCredential. This identifier can be used to look up credentials for future calls to CredentialsContainer.get.
PublicKeyCredential.response Read only
An instance of an AuthenticatorResponse object. It is either of type AuthenticatorAttestationResponse if the PublicKeyCredential was the results of a create() call, or of type AuthenticatorAssertionResponse if the PublicKeyCredential was the result of a get() call.

Methods

PublicKeyCredential.getClientExtensionResults()
If any extensions were requested, this method will return the results of processing those extensions.

Specifications

Specification Status Comment
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 AndroidiOS SafariSamsung Internet
Basic supportChrome Full support 65
Notes Disabled
Full support 65
Notes Disabled
Notes Only support USB U2F tokens
Disabled From version 65: this feature is behind the Web Authentication API preference (needs to be set to Enabled). To change preferences in Chrome, visit chrome://flags.
Edge Full support 18Firefox Full support 60
Notes
Full support 60
Notes
Notes Only support USB U2F tokens
IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
rawIdChrome Full support 65
Notes Disabled
Full support 65
Notes Disabled
Notes Only support USB U2F tokens
Disabled From version 65: this feature is behind the Web Authentication API preference (needs to be set to Enabled). To change preferences in Chrome, visit chrome://flags.
Edge Full support 18Firefox Full support 60
Notes
Full support 60
Notes
Notes Only support USB U2F tokens
IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
responseChrome Full support 65
Notes Disabled
Full support 65
Notes Disabled
Notes Only support USB U2F tokens
Disabled From version 65: this feature is behind the Web Authentication API preference (needs to be set to Enabled). To change preferences in Chrome, visit chrome://flags.
Edge Full support 18Firefox Full support 60
Notes
Full support 60
Notes
Notes Only support USB U2F tokens
IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
getClientExtensionResultsChrome Full support 65
Notes Disabled
Full support 65
Notes Disabled
Notes Only support USB U2F tokens
Disabled From version 65: this feature is behind the Web Authentication API preference (needs to be set to Enabled). To change preferences in Chrome, visit chrome://flags.
Edge Full support 18Firefox Full support 60
Notes
Full support 60
Notes
Notes Only support USB U2F tokens
IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
isUserVerifyingPlatformAuthenticatorAvailableChrome Full support 65
Notes Disabled
Full support 65
Notes Disabled
Notes Only support USB U2F tokens
Disabled From version 65: this feature is behind the Web Authentication API preference (needs to be set to Enabled). To change preferences in Chrome, visit chrome://flags.
Edge Full support 18Firefox Full support 60
Notes
Full support 60
Notes
Notes Only support USB U2F tokens
IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown
See implementation notes.
See implementation notes.
User must explicitly enable this feature.
User must explicitly enable this feature.

Document Tags and Contributors

Contributors to this page: thnam, Garitz, ExE-Boss, apowers313
Last updated by: thnam,