From: Teo Koon Peng Date: Tue, 23 Aug 2022 13:57:25 +0000 (+0800) Subject: ⬆ Upgrade Swagger UI copy of `oauth2-redirect.html` to include fixes for flavors... X-Git-Tag: 0.80.0~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec072d75fe0aae16caec3a8aa3f57ca8d6f05de5;p=thirdparty%2Ffastapi%2Ffastapi.git ⬆ Upgrade Swagger UI copy of `oauth2-redirect.html` to include fixes for flavors of authorization code flows in Swagger UI (#3439) Co-authored-by: Sebastián Ramírez --- diff --git a/fastapi/openapi/docs.py b/fastapi/openapi/docs.py index d6af17a850..b7803b13bd 100644 --- a/fastapi/openapi/docs.py +++ b/fastapi/openapi/docs.py @@ -115,12 +115,14 @@ def get_redoc_html( def get_swagger_ui_oauth2_redirect_html() -> HTMLResponse: + # copied from https://github.com/swagger-api/swagger-ui/blob/v4.14.0/dist/oauth2-redirect.html html = """ - + - - - + + Swagger UI: OAuth2 Redirect + + + + """ return HTMLResponse(content=html)