webauthn-example

Basic WebAuthn client and server in go

Github星跟踪图

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

主要指标

概览
名称与所有者hbolimovsky/webauthn-example
主编程语言Go
编程语言HTML (语言数: 2)
平台
许可证
所有者活动
创建于2019-04-03 19:22:51
推送于2022-10-27 04:55:28
最后一次提交2019-12-25 14:41:22
发布数0
用户参与
星数98
关注者数5
派生数43
提交数11
已启用问题?
问题数3
打开的问题数3
拉请求数0
打开的拉请求数3
关闭的拉请求数0
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?