diff --git a/packages/node_modules/@node-red/editor-api/lib/auth/index.js b/packages/node_modules/@node-red/editor-api/lib/auth/index.js index d4ec10f08..fb95ede7b 100644 --- a/packages/node_modules/@node-red/editor-api/lib/auth/index.js +++ b/packages/node_modules/@node-red/editor-api/lib/auth/index.js @@ -90,7 +90,7 @@ function getToken(req,res,next) { return server.token()(req,res,next); } -function login(req,res) { +async function login(req,res) { var response = {}; if (settings.adminAuth) { var mergedAdminAuth = Object.assign({}, settings.adminAuth, settings.adminAuth.module); @@ -116,8 +116,9 @@ function login(req,res) { response.prompts[0].image = theme.serveFile('/login/',mergedAdminAuth.strategy.image); } } - if (theme.context().login && theme.context().login.image) { - response.image = theme.context().login.image; + let themeContext = await theme.context(); + if (themeContext.login && themeContext.login.image) { + response.image = themeContext.login.image; } } res.json(response);