webauthn-example

Basic WebAuthn client and server in go

Github stars Tracking Chart

WebAuthn Basic Client/Server Example (go)

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.

Blog Post

You can check it out here

Quickstart

Download

Download the project (i.e. via git clone or go get) and navigate to the project's root directory.

Start

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

Test

Spin Up

Fire up a web browser and go to localhost:8080. You should see something like this:

webpage_example.png

Note: as of this writing, not all web browsers support WebAuthn - you'll receive a warning if the browser you're using doesn't.

Register

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:

auth_example.png

Upon successful registration, you'll see an alert saying you successfully registered, similar to this:

success_register.png

Login

Press the login button and follow the instructions. The login process is identical (user side) to the registration process.

Extra

WebAuthn BLE Support In Chrome

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

chrome_ble_flags.png

Main metrics

Overview
Name With Ownerhbolimovsky/webauthn-example
Primary LanguageGo
Program languageHTML (Language Count: 2)
Platform
License:
所有者活动
Created At2019-04-03 19:22:51
Pushed At2022-10-27 04:55:28
Last Commit At2019-12-25 14:41:22
Release Count0
用户参与
Stargazers Count98
Watchers Count5
Fork Count43
Commits Count11
Has Issues Enabled
Issues Count3
Issue Open Count3
Pull Requests Count0
Pull Requests Open Count3
Pull Requests Close Count0
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private