Run the WebAuthn Server Example
mainThe fido2-example-server provides a minimal website demonstrating WebAuthn credential registration and authentication using python-fido2.
Prerequisites
uvmust be installed on your system. For installation instructions, visit https://docs.astral.sh/uv/.
Setup and Execution
- Navigate to the
examples/serverdirectory. - Synchronize the environment using
uv sync. - Start the server using
uv run server. - Access the website at
http://localhost:5000using a WebAuthn-compatible browser.
Security Note
WebAuthn requires a secure context (HTTPS). While most browsers treat http://localhost as a secure context (allowing this demo to run without TLS), you must use HTTPS with a valid certificate in production environments.
# Navigate to the example directory
cd examples/server
# Set up the environment
uv sync
# Run the server
uv run server