Support Article
Redirect not happening after session timeout after upgrade
SA-93306
Summary
Post upgrade to Pega Platform 8.1.4, the below custom HTML on the Authentication Service (where the getDesktopApplication() is invoked) displays a null value and logoff does not occur when the session times out.
<pega:include name="DesktopWrapperInclude" type="Rule-HTML-FRAGMENT"/>
<script>
alert("Session has Timed Out - Please enter login details again");
var application = getDesktopApplication();
application.logOff();
var myDesktop = null;
var myWindow = null;
for(myDesktop = top; myDesktop != null; myDesktop = myDesktop.opener) {
myWindow = myDesktop;
myDesktop = myDesktop.top;
if (myDesktop.application &&
myDesktop.ApplicationController &&
(null != myDesktop.application)) {
break;
}else {
myWindow.close();
}
}
window.close();
</script>
Error Messages
Not Applicable
Steps to Reproduce
- Upgrade PRPC 6.1 to Pega Platform 8.1.4.
- Log in to the application.
- Allow the session to time out.
- Click Ok on Timeout alert popup.
Root Cause
A defect in Pegasystems’ code or rules:
The Log Off script failed because the below code does not exist in the application.
var application = getDesktopApplication(); application.logOff();
Resolution
Perform the following local-change:
Configure the Timeout stream with the below code.
<script>
var url = top.location.href;
var redirecturl = url + "&pyActivity=Code-Security.LogOff&pzAuth=guest&logoff=true"
if(top.navigate){
top.navigate(redirecturl);
} else{
top.location = redirecturl;
}
</script>
Published April 3, 2020 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.