Skip to Content
0

SAP UI5 CLOUD HTML APPLICATIONS LOGOUT ISSUE

Feb 07 at 02:17 PM

141

avatar image
Former Member

Hi ,

I have deployed my application under cloud HTML5 applications.

We use single sign on process for login.

Am able to run my deployed applicaiton sucessfully, but when I implmenet logout funcitonality, am unable to achieve it.

I am following the below steps to implement logut functionality:

Added below code in neoapp.json file:

"logoutPage": "/logout.html",

"authenticationMethod": "saml",

"routes": [

{ "path": "/services/userapi",

"target": {

"type": "service",

"name": "userapi"

}

}

]

I created a logout.index HTML file as well and added below code:

<!DOCTYPE HTML>

<html>

<body role="application">

You have been logged out!

</body>

</html>

and On logout click, below code is written:

$.ajax({

"type" : 'GET',

"url": "/services/userapi/logout",

"success": function() { window.location.replace("applicaotn url"); }

});

While testing the logout funcitonality, below logout service url is throwing 302 and 503

https://xxxxxxxxxxhana.ondemand.com/services/userapi/logout

Any One please help me on fixing the above error, whether am i missing any of the configurations steps

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

1 Answer

Ivan Mirisola
Feb 07 at 07:16 PM
0

Hi Mahesh,

Please read the note at the bottom of this blog.

The logoff functionality will only work while the application is running under the context of SCP.
Your screen shows that your application is runnning in "test mode", thus the context is Web IDE and not your app.

Regards,
Iivan

Show 5 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Ivan,

Application is not runnning in "test mode", its in active mode only and its on SCP only.

I am able to get the details of /services/userapi/currentUser successfilly, but not logout.

can you please let me in detail about active mode.

Thanks

Mahesh

0
Former Member

Hi Ivan,

Application is not runnning in "test mode", its in active mode only and its on SCP only.

I am able to get the details of /services/userapi/currentUser successfilly, but not logout.

can you please let me in detail about active mode.

Thanks

Mahesh

0

Hi Mahesh,

The URL from the picture starts with webidetesting... Thus, this is test mode.

To open your deployed HTML5, you need to start it from the cockpit --> Applications --> HTML5.

Regards,
Ivan

0
Former Member

Hi Ivan,

I am running the applicaiton from cockpit --> Applications --> HTML5 in active mode, still i see no success in log out.

Kindly help me on this.

Thanks

Maheshactive-application-status.png

0

If you share your work on github I could try to reproduce the error here and see if I can find a solution.

The way you are doing is supposed to work.

0