This demo shows how to integrate with the VDM FIDO2 WebAuthn backend to enable passwordless authentication using FIDO2/WebAuthn standards.
The demo consists of two main pages:
The WebAuthn API allows websites to register and authenticate users using public key cryptography instead of passwords. Here's how it works:
The demo uses:
For more details, see the code in:
/js/easykey.js: The SDK implementationindex.html and login.html: Demo pagesThe enrollment flow follows this sequence:
User -> Desktop Browser: Login (userId, password) Desktop Browser -> Server APP: Login (userId, password) Desktop Browser <- Server APP: Login OK User <- Desktop Browser: enroll EasyKey? User -> Desktop Browser: enroll request Desktop Browser -> JS SDK: start enroll EasyKey JS SDK -> Server EasyKey: challenge request Server EasyKey -> Server EasyKey: generate challenge JS SDK <- Server EasyKey: challenge JS SDK -> JS SDK: Generate key pair (WebAuthn API), deviceID JS SDK -> JS SDK: sign(challenge) JS SDK -> Server EasyKey: POST /enroll Signed message + Metadata Server EasyKey -> Server EasyKey: Verify Signature(signature,challenge) Server EasyKey -> Server EasyKey: Update User and Store Device Server EasyKey --> JS SDK: 201 OK Desktop Browser <- JS SDK: enroll OK