Giter Site home page Giter Site logo

webauthn-example's Introduction

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 [email protected] 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

webauthn-example's People

Contributors

hbolimovsky avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.