diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.sign-in/sign-in.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.sign-in/sign-in.js index dfc0877482..cea0fc2d7b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.sign-in/sign-in.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.sign-in/sign-in.js @@ -1,6 +1,7 @@ function onRequest(context) { var authModuleConfigs = context.app.conf["authModule"]; var sessionDataKey = request.getParameter("sessionDataKey"); + var authFailure = request.getParameter("authFailure"); //if sso enabled and sessionDataKey is empty redirect var ssoConfigs = authModuleConfigs["sso"]; @@ -18,7 +19,11 @@ function onRequest(context) { var viewModel = {}; var loginActionUrl = context.app.context + "/uuf/login"; if (sessionDataKey) { - loginActionUrl = "/commonauth"; + loginActionUrl = "/commonauth"; + } + + if(authFailure){ + viewModel.message = "Login failed! Please recheck the username and password and try again."; } viewModel.sessionDataKey = sessionDataKey;