Intro Web Authentication(WebAuthN) API の策定と実装が進んでいる。 これを用いると、 FIDO(Fast IDentity Online) U2F(Universal Second Factor) 認証が可能になる。 今回は YubiKey 認証の実装を通じて、ブラウザ API の呼び出しと、サーバ側で必要な処理について解説する。 https://w3c.github.io/webauthn/ DEMO 動作するデモを以下に用意した。 https://labs.jxck.io/webauthentication/fido-u2f/ YubiKey での動作のみ確認している。 コードは以下にあり、今回の解説もここから抜粋している。 (あくまで API の流れを解説するためのものであるため、飛ばした処理もあり、本番利用に耐えうるものではない。) https
![Web Authentication API で FIDO U2F(YubiKey) 認証 | blog.jxck.io](https://cdn-ak-scissors.b.st-hatena.com/image/square/25f705929f7e98ea08f049f3c57b5de57a1b3ba0/height=288;version=1;width=512/https%3A%2F%2Fblog.jxck.io%2Fassets%2Fimg%2Fjxck.600x600.png)