W3cubDocs

/Web APIs

AuthenticatorAssertionResponse: userHandle property

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

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
userHandle 67 18
60Only supports USB U2F tokens.
No 54 13 No 70 92
60–92Only supports USB U2F tokens.
48 13 10.0

See also

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAssertionResponse/userHandle