Skip to Content

HCP HTML5(UI5) application logout not happening using userapi ?

Aug 03, 2017 at 02:25 PM


avatar image
Former Member

I have configured following in neo-app.json

"routes": [
     "path": "/services/userapi", 
     "target": {
       "type": "service",
       "name": "userapi"

Then I am trying to logout service call on a button press as given below,

      "url": "/services/userapi/logout",
      "success": function() {

Once this ajax call completed I can see the following message in browser network tab,

preview :

Note : I am not able to do logout functionality from the application but however if I am opening the same logout request url in new tab the logout happens successfully.

Am I missing some configuration ?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Jithin Kumar Aug 08, 2017 at 10:46 AM


Finally I figured it out, please follow the below process for logout functionality in IDP configured application:

In neo-app.json ("logoutPage": "/logout.html",)

   "welcomeFile": "/index.html",
   "logoutPage": "/logout.html",
   "saml","routes": [{

When logout event handler trigger : ie. on Button press event :

sap.m.URLHelper.redirect("logout.html", false);

Create a .html file in your root directory of your application (logout.html):

<html lang="en-US">
        <meta charset="UTF-8">
        <meta http-equiv="refresh" content="1; url=https:<url to the application>">
        <script type="text/javascript">
            window.location.href = "url=https:<url to the application>"
        <title>Page Redirection</title>
   <!-- <body>
        <!-- Note: don't tell people to `click` the link, just tell them that it is a link. -->
        Logging out.......
        If you are not redirected automatically, follow this <a href='<url to the application>'>link</a>.
    </body> -->
Show 1 Share
10 |10000 characters needed characters left characters exceeded


I'm facing similar issue whereby not able to logout. I tried the solution from @Jithin Kumar, it was able to navigate to the logout html page. But when i click back or rerun the app url, it wasn't get logout and still able to launch the app. The session does not get refresh using /services/userapi/logout.

Any input from this?