cancel
Showing results for 
Search instead for 
Did you mean: 

cloud foundry auto logout from fiori launchpad using sapui5 application?

former_member198924
Participant
0 Kudos

Hi All,

I want to auto logout from the launchpad using sapui5 application. If the idle time reached 5mins after that launchpad should logout automatically using SAPUI5 application. I have tried to call the logout page but I'm getting 404 not found error. I have attached the screenshot and code for your reference. Please advise me on this issue. cflogoutissue.png

xs-app.json file<br>{
"welcomeFile": "/index.html", "authenticationMethod": "route", "logout": { "logoutEndpoint": "/do/logout" }, "routes": [ {
"source": "^/logout-page.html$", "service": "html5-apps-repo-rt", "authenticationType": "none" }, { "source": "^index.html$", "service": "html5-apps-repo-rt", "authenticationType": "xsuaa", "cacheControl": "no-cache, no-store, must-revalidate" }, { "source": "^/resources/(.*)$", "target": "/resources/$1", "authenticationType": "none", "destination": "ui5", "cacheControl": "no-cache, no-store, must-revalidate" }, { "source": "^/test-resources/(.*)$", "target": "/test-resources/$1", "authenticationType": "none", "destination": "ui5" }, { "source": "^(.*)$", "target": "$1", "service": "html5-apps-repo-rt", "authenticationType": "xsuaa" } ]}
Controller.js<br><br> // Interval Function Start
fnInterval: function () { var that = this; timer = setInterval(function () { that.onLogout(); }, 60000); // }, 300000); }, onLogout: function () { var that = this; sap.m.URLHelper.redirect("do/logout", false); console.log("Auto Logout /do/logout"); },
former_member198924
Participant
0 Kudos

xs-app.json

Accepted Solutions (0)

Answers (1)

Answers (1)

Neeraj_Jain
Active Contributor
0 Kudos

Hello DURAI VENKATESH,

Please refer below SAP Blog. Might be it's helps to you.

https://blogs.sap.com/2019/08/12/sapui5-applications-with-approuter-sessions-and-automatic-logout/

https://userapps.support.sap.com/sap/support/knowledge/en/2320068

Please confirm if it's works for you.

Regards,

Neeraj Jain

former_member198924
Participant
0 Kudos

Hi Neeraj,

I have go through the above blog but I'm getting 404 not found issue. Please see the screenshot below.

Neeraj_Jain
Active Contributor
0 Kudos

Have updated the answer with a SAP Note for your 404 error. Please check.