Added

Session Management for FastAPI

📣 FastAPI Auth SDK 1.0.0 Release 🎉

Please refer to the GitHub README for updated documentation and details.


Version 1.0.0 - Major Release

New Features

  • Built-in session management: Added SessionMiddleware with encrypted cookie-based sessions
  • CSRF protection: Automatic token generation and validation via Synchronizer Token Pattern
  • Route protection: New create_session_auth_dependency() method for FastAPI dependency-based auth with automatic token refresh
  • Session/Token endpoints: Added get_session_response() and get_token_response() helpers for Wristband frontend SDK integration, along with SessionResponse and TokenResponse Pydantic models

Breaking Changes

If you're coming from a previous version of the FastAPI SDK, refer to the v1 Migration Guide to see how to upgrade.

  • Renamed default_tenant_domain_name → default_tenant_name (LoginConfig)
  • Renamed tenant_domain_name → tenant_name (CallbackData, LogoutConfig)
  • Changed UserInfo from dict to typed Pydantic model with field name mappings (e.g., sub → user_id)
  • Added UserInfoRole model for typed role data
  • Renamed req parameter to request for WristbandAuth methods

FastAPI Demo App

  • The FastAPI Demo App has been updated to use this SDK's session management features.