diff --git a/src/core/index.js b/src/core/index.js index c34b91b6..544f16d8 100644 --- a/src/core/index.js +++ b/src/core/index.js @@ -104,8 +104,6 @@ module.exports = function SwaggerUI(opts) { var system = store.getSystem() - system.initOAuth = system.authActions.configureAuth - const downloadSpec = (fetchedConfig) => { if(typeof constructorConfig !== "object") { return system diff --git a/src/core/plugins/auth/index.js b/src/core/plugins/auth/index.js index 0937f805..7e9413f4 100644 --- a/src/core/plugins/auth/index.js +++ b/src/core/plugins/auth/index.js @@ -5,6 +5,9 @@ import * as specWrapActionReplacements from "./spec-wrap-actions" export default function() { return { + afterLoad(system) { + system.initOAuth = system.authActions.configureAuth + }, statePlugins: { auth: { reducers,