This demo is part of a blog post that describes how to migrate an application from Rails to WebAuthn.
This repository has been archived as it is unlikely to ever need changes again. Chrome has successfully disabled support for the classic FIDO U2F API ("Cryptotoken") as of February 2022.
While you'd be best served reading the blog post, the tl;dr is:
- Try out the app when it only supports U2F (see the tag
u2f-only
) - Switch U2F signing to WebAuthn (see the tag
sign-with-webauthn
) - Migrate the database to support distinguishing U2F vs WebAuthn (see the tag
db-migration
) - Switch registration to WebAuthn only (see the tag
full-webauthn
)
These instructions are good for any commit in this repo.
-
Generate TLS certificates:
mkcert -install mkcert -cert-file config/tls/localhost.pem -key-file config/tls/localhost-key.pem localhost
-
Run
rake db:migrate
-
Run
rails s
to start it!