Giter Club home page Giter Club logo

webauthn's Introduction

PHP webauthn implementation

webauthn allows for browser logins using a physical key (such as a Yubikey 2 security key) or, in due course, biometrics such as fingerprints, that support the protocol. Google also recently started selling Titan, a pair of compatible hardware keys, but I don't have one yet to test code this with which I have now been able to test with and confirmed works with no change to the code.

Webauthn was announced for Firefox 60 in May 2018 and also later added to Chrome. The idea of the age of password-less logins was widely broadcast in the technical press. But the reality is the whole thing is just too complicated for easy adoption. It needs another layer to simplify it for routine use.

There are a couple examples in Javascript (see the "coffee" example). But the whole point is that the challenge and authentication must be done server-side.

It's fiendishly complicated, not so much in the cryptography as the way the structures are packed and named. Unnecessarily so (CBOR? What? Surely browsers could have unpacked it from that even if space is at such a premium that keys themselves require this weird binary format; and why not produce the key in PEM format. And so on).

So I spent quite a while translating the "coffee" example into a PHP class, while doing the minimum at the browser side (just unpacking enough to put into a convenient JSON form to transport to the server), and I thought I would share it.

Dependencies

This requires

Example

The example code is live at https://webauthn.savesnine.info.

webauthn's People

Contributors

davidearl avatar phpgangsta avatar

Watchers

 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.