duo-labs / webauthn.io

The source code for webauthn.io, a demonstration of WebAuthn.
https://webauthn.io
BSD 3-Clause "New" or "Revised" License
660 stars 122 forks source link
authentication demo passkeys python security webauthn

webauthn.io

Duo's introduction to the wonderful world of WebAuthn. Powered by py_webauthn.

Prerequisites

Environmental Variable

Development

Run the following command to get started:

$> ./start-dev.sh

The site will be available at http://localhost/

CSS

CSS leans on browsers and their native CSS nesting support, which allows for nicer CSS authoring without pre-processors. Unfortunately for now this means the following command will need to be run after making any changes to CSS to ensure that the changes are served by Caddy on subsequent reloads:

docker compose run django ./manage.py collectstatic --no-input

Production

Run the following command to start up the website with production-ready settings:

$> ./start-prod.sh

The site will be available for viewing at https://{PROD_HOST_NAME}. The included Caddy server (as the caddy service in docker-compose.yml) will handle SSL certificate management.

Updating Production

Run the following commands to rebuild and restart the django service with any new updates:

$> git pull
$> ./update-prod-django.sh

The django and caddy services will be temporarily stopped during the build, and will restart once the django has been rebuilt.