diff --git a/drf_spectacular/templates/drf_spectacular/swagger_ui.js b/drf_spectacular/templates/drf_spectacular/swagger_ui.js index efee7ef3..0c9b954e 100644 --- a/drf_spectacular/templates/drf_spectacular/swagger_ui.js +++ b/drf_spectacular/templates/drf_spectacular/swagger_ui.js @@ -10,6 +10,11 @@ const reloadSchemaOnAuthChange = () => { statePlugins: { auth: { wrapActions: { + authorizeOauth2:(ori) => (...args) => { + schemaAuthFailed = false; + setTimeout(() => ui.specActions.download()); + return ori(...args); + }, authorize: (ori) => (...args) => { schemaAuthFailed = false; setTimeout(() => ui.specActions.download());