Giter Site home page Giter Site logo

webauthn's Introduction

Experts Coding logo

WebAuthn Demo

In this repo, you can find the demos showed at the Commit Conf 2019. It's a simple web to demonstrate the use of WebAuthn API in the browser, supporting multiplatform authenticators.
The backend is a .Net Core web app using the Fido2 library to implement the cryptography plumbing and some models to communicate with the frontend.
The frontend is just Html and TypeScript (obviously compiled to JS) using the integrated APIs in your browser.

Also, take a look at the slides presented in the talk for a complete reference and a lot of stuff of the protocols, libraries, etc.

Running the project

Only a few requirements are needed to build and run the project: .Net Core 2.2 SDK (You can download it from https://dotnet.microsoft.com/download) and a modern browser to have fun!

Once installed, just clone the repo, then, in the console of your choice run the following commands:

npm install

It'll install the necessary dependencies to compile the TypeScript files and copy modules.

npm start

This will run the gulp tasks, then the dotnet server locally.

Using outside your localhost

If you want to access the site from the internet, for example, to try the capabilities of your mobile phone regardless of WebAuthn, then you need some kind of tunnel to your host.

In this case, I'll recommend two options: ngrok or localtunnel.me
The first one has some free tier, but https it's a premium feature. It works like a charm.
The second one it's free, even the https redirection to your localhost, but sometimes fails. 😔

Finally, if you go with localtunnel.me, after install the npm package (please refer to the repository), the command to establish the tunnel is:

lt -p 5000 --local-https local-cert .\localhost-demo.p12 --allow-invalid-cert

This will create the tunnel to port 5000 (the one where the demo app is running) enabling https redirect and ignoring invalid certificates.

There are other options out there, take a look and choose whatever you want!

If you don't have a physical key

Despite the original demo was made with a set of physical keys, for testing purposes (or even as a backup method), you have software alternatives in the form of a mobile app and browser plugin, Krypton Authenticator is a great app that do the job.

License

This work is licensed under the MIT License

webauthn's People

Contributors

manu-vilachan avatar

Stargazers

 avatar Thiago avatar Miguel Ángel Bueno Ferrer avatar Mariano Moreno avatar Álvaro Brey avatar Pere Albujer avatar

Watchers

James Cloos avatar  avatar Antonio Marin avatar Gilpe avatar

Forkers

hedesil nmarulo

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.