Passwordless in Python using py_webauthn
Note: this demo is based on another demo by duo labs. Blog post.
- Python 3.11+
- Windows only: Microsoft Build Tools for Visual Studio 2022
- Unix based systems only: any C compiler
- Docker (for running the Dockerfile)
- A Google Account in the case of running with Google colaboratory.
In this directory, run the following commands:
-
Generate a new
venv
(Virtual environment):Unix:
python3 -m venv venv
Windows:
py -m venv .venv
-
Activate the
venv
:Unix:
source venv/bin/activate
Windows:
venv\bin\Activate.bat
-
Install the dependencies:
pip install -r requirements.txt
-
Run the server:
Unix:
./start-server.sh
Windows:
.\start-server.ps1
-
Build the image:
docker build -t passwordless .
-
Run the container:
docker run -p 5000:5000 passwordless
Go ahead and try it out on Google Colab by clicking the badge below:
Make sure you have an active Google Account for this.
Google Colab is a free Jupyter notebook environment that requires no setup and runs entirely in the cloud. It also allows you to run a local server with a proxy and a public URL to access it.
You can modify source code directly in the browser and run it in the cloud.