AuthenticatorAssertionResponse: userHandle property

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2021.

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The userHandle read-only property of the AuthenticatorAssertionResponse interface is an ArrayBuffer object providing an opaque identifier for the given user. Such an identifier can be used by the relying party's server to link the user account with its corresponding credentials and other data.

This value is specified as user.id in the options passed to the originating navigator.credentials.create() call.

Value

An ArrayBuffer object representing an identifier for the current user. This is not intended to be human-readable. The relying party should make sure that the user.id passed into the originating create() call does not contain any personally identifying information (for example user name, email, or phone number).

For navigator.credentials.create() calls made with a non-empty allowCredentials properties, the returned userHandle may be null.

Examples

See User login using the WebAuthn API for a detailed example.

Specifications

Specification
Web Authentication: An API for accessing Public Key Credentials - Level 3
# dom-authenticatorassertionresponse-userhandle

Browser compatibility

BCD tables only load in the browser

See also