SimpleWebAuthnのExample
/puclic/index.html (クライアント側)
登録時
fetch('/generate-registration-options')SimpleWebAuthnBrowser.startRegistrationfetch('/verify-registration')
2回目以降の認証時
fetch('/generate-authentication-options')-
SimpleWebAuthnBrowser.startAuthentication
useAutofill: trueは自動で認証器を選択し、チャレンジを促す fetch('/verify-registration')
index.ts (サーバー側)
/generate-registration-options
認証器を登録するためのオプション生成
/verify-authentication
ブラウザや認証器から送られてきた認証レスポンスをサーバー側で検証
/generate-authentication-options
登録済みの認証器を使って、ユーザーを認証するためのオプションを生成