improved

Pydantic Models for FastAPI SDK

๐Ÿ“ฃ FastAPI Auth SDK 0.4.0 Release ๐ŸŽ‰

Below is a summary of changes made to the FastAPI Auth SDK:

  • All model classes have been migrated from Python dataclasses to Pydantic models for improved validation and serialization.
  • When the login() method cannot resolve a tenant domain from the request (subdomain, query parameters, or defaults), the SDK redirects users to the Application-Level Login (Tenant Discovery) Page. To ensure a seamless user experience, any provided return URL values are automatically preserved by appending them to the state query parameter. This allows the return URL to be propagated back to the Login Endpoint once tenant discovery is complete, ensuring users land at their originally intended destination after authentication.
  • The README has been updated to show the FastAPI Dependency approach to protecting APIs in favor of the prior Middleware-based approach.
  • The README has been updated to show how to implement CSRF protection in FastAPI.