mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2025-08-14 18:58:10 +08:00
Updated OAuth2 router generator for better OpenAPI docs (#793)
* Added OAuth2 authorize route response_model * Changed OAuth2 "authorize" route backend param type. On OAuth2 router creation, an enum is created for the `authentication_backend` parameter. This allows us to generate OpenAPI docs correctly. * Reformatted with "make format" * Updated OAuth2 authorize url docs - /authorize now returns 422 instead of 400 for an invalid authentication backend
This commit is contained in:
@ -79,3 +79,7 @@ class BaseOAuthAccountMixin(BaseModel):
|
||||
"""Adds OAuth accounts list to a User model."""
|
||||
|
||||
oauth_accounts: List[BaseOAuthAccount] = []
|
||||
|
||||
|
||||
class OAuth2AuthorizeResponse(BaseModel):
|
||||
authorization_url: str
|
||||
|
Reference in New Issue
Block a user