WebAuthn Local Client: Tests

Github

Before running these tests, make sure you're on a device that supports Web Authentication, or alternatively use browser DevTools to setup a virtual authenticator in Chrome, or similar in Safari, or this Firefox add-on.


NOTE: This test-bed does not persist (in LocalStorage, on a server, etc) any credentials or other information entered here. To reduce confusion, on each page load you should probably reset your device's authenticator (or virtual authenticator) by removing any credentials created on previous runs of these tests.


Steps To Run (Re-)Registration [2] and Authentication [4] Tests:

  1. Register a new credential. Enter any username you like. Also put in any text you want for User ID, or click the "Generate Random" button. Make sure to copy the User ID to your clipboard before clicking the "Register" button.
  2. Now, the newly registered credential will appear in the list below (with a credential ID and Count), with an "authenticate" button next to it.
  3. Register another new credential, with the same or different name, but with the same User ID (pasted from your clipboard). Notice this will fail with an error message.
  4. Now, re-register the credential, with the same or different name, but with the same User ID (pasted from your clipboard). Notice this will succeed, and that the "Credential ID" for that entry will change in the list below (as does the underlying "publicKey").
  5. Click that "authenticate" button in the credentials list below, and choose your passkey (Touch-ID, Face-ID, etc). Notice the count in the list will go up upon successful authentication. 1
  6. Now click the "choose authentication method" button that appears above the credentials list.
  7. Click the "Pick my passkey" button, and select your passkey from the browser modal prompt. Notice the count will go up again on success. 1
  8. Click "choose authentication" again, then click "Provide my user ID".
  9. Click into the empty User ID text box, and notice the browser autofill shows the option to choose your passkey. Notice the count goes up again on success. 1
  10. Click "choose authentication" one final time, then "Provide my user ID" again. Click into the input box, and paste in the User ID from your clipboard (from step 1). Click "Authenticate". Notice one last time, the count goes up on success. 1

Footnotes

  1. A signature counter is not supported by all authenticators. If not supported, the count will display as "n/a".

Actions:


Registered Credentials: