Javascript
Examples for dynamic interactions
You will interact with the authenticators through an HTML page and Javascript using the Webauthn API.
A package is available at https://github.com/web-auth/webauthn-helper. It contains functions that will ease the interaction with the login or the registration endpoints.
It is mandatory to use the HTTPS scheme to use Webauthn otherwise it will not work.
Installation
You can use npm or yarn to install the package:
Registration
Additional options can be set during the registration process. See the section “Deep into the framework” to know more. Hereafter another example:
The specification Webauthn L2 deprecates the use of the parameter requireResidentKey
; you should use residentKey instead with one of the following value: required
, preferred
or discouraged
.
To have the same behavior as above, please use required
.
Authentication
As done during the registration, additional options are available. See the section “Deep into the framework” to know more. Hereafter another example:
Last updated