This library implements a simple, basic WebAuthn client and server based on duo's WebAuthn implementation. The code pulls inspiration from duo's WebAuthn example implementation. This example is NOT meant to be used in production, but rather as an introduction to WebAuthn as well as a more quick-and-dirty, stripped down version of webauthn.io.
You can check it out here
Download the project (i.e. via git clone
or go get
) and navigate to the project's root directory.
Start the server by compiling and running the code. It should look something like this:
$ go run .
2019/04/01 11:45:09 starting server at :8080
Fire up a web browser and go to localhost:8080. You should see something like this:
Note: as of this writing, not all web browsers support WebAuthn - you'll receive a warning if the browser you're using doesn't.
To test that the demo is working properly, enter an email like foo@bar.com
and press the Register
button. You should be prompted to gesture (i.e. tap, scan finger) to some authenticator. It should look something like this:
Upon successful registration, you'll see an alert saying you successfully registered, similar to this:
Press the login button and follow the instructions. The login process is identical (user side) to the registration process.
In your Chrome broswer go to chrome://flags/
and search for 'web auth', then set 'Web Authentication API BLE support' and 'Web Authentication caBLE support' to enabled