Improved
Enhancement to FastAPI Demo App
about 2 months ago by Jim Verducci
The FastAPI Demo App is now using version 0.3.0 of the fastapi-auth SDK. It demonstrates the new SDK auto-configuration capability. Now, only 3 fields are required when initializing the SDK in this demo app: wristbandApplicationVanityDomain, clientId, and clientSecret.
from wristband_fastapi_auth import WristbandAuth, AuthConfig
# Configure Wristband authentication
auth_config = AuthConfig(
client_id="<your_client_id>",
client_secret="<your_client_secret>",
wristband_application_vanity_domain="auth.yourapp.io",
)
# Initialize Wristband auth instance
wristband_auth = WristbandAuth(auth_config)