PublicKeyCredentialCreationOptions

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

Properties

PublicKeyCredentialCreationOptions.rp
TBD
PublicKeyCredentialCreationOptions.user
TBD
PublicKeyCredentialCreationOptions.challenge
TBD
PublicKeyCredentialCreationOptions.pubKeyCredParams
array of TBD
PublicKeyCredentialCreationOptions.timeout Optional
TBD
PublicKeyCredentialCreationOptions.excludeCredentials Optional
array of TBD
PublicKeyCredentialCreationOptions.authenticatorSelection Optional
TBD
PublicKeyCredentialCreationOptions.attestation Optional
TBD
PublicKeyCredentialCreationOptions.extensions Optional
dictionary of TBD

Methods

None.

Examples

// some examples of COSE algorithms
const cose_alg_ECDSA_w_SHA256 = -7;
const cose_alg_ECDSA_w_SHA512 = -36;

// the PublicKeyCredentialCreationOptions object
var createCredentialOptions = {

    // Format of new credentials is publicKey
    publicKey: {

        // Relying Party
        rp: {
            name: "Acme",
        },

        // User
        user: {
            id: new Uint8Array(16),
            name: "john.p.smith@example.com",
            displayName: "John P. Smith",
        },

        // Requested format of new keypair
        pubKeyCredParams: [{
            type: "public-key",
            alg: cose_alg_ECDSA_w_SHA256,
        }],

        timeout: 60000 // Timeout after 1 minute
    }
};

// Create the new credential with the options above
navigator.credentials.create(createCredentialOptions);

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 AndroidSafari on iOSSamsung Internet
Basic support
Experimental
Chrome Full support 67Edge ? Firefox Full support 60IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
attestation
Experimental
Chrome Full support 67Edge ? Firefox Full support 60IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
authenticatorSelection
Experimental
Chrome Full support 67Edge ? Firefox Full support 60IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
challenge
Experimental
Chrome Full support 67Edge ? Firefox Full support 60IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
excludeCredentials
Experimental
Chrome Full support 67Edge ? Firefox Full support 60IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
extensions
Experimental
Chrome Full support 67Edge ? Firefox Full support 60IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
pubKeyCredParams
Experimental
Chrome Full support 67Edge ? Firefox Full support 60IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
rp
Experimental
Chrome Full support 67Edge ? Firefox Full support 60IE ? Opera Full support YesSafari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android Full support YesSafari iOS ? Samsung Internet Android ?
timeout
Experimental
Chrome Full support 67Edge ? Firefox Full support 60IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
user
Experimental
Chrome Full support 67Edge ? Firefox Full support 60IE ? 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
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.

Document Tags and Contributors

Contributors to this page: fscholz, chrisdavidmills, apowers313
Last updated by: fscholz,