on 08-03-2017 3:25 PM
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,
$.ajax({
"url": "/services/userapi/logout",
"success": function() {
window.location.replace("http://www.abcd.com");
}
});
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 ?
Hi,
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",
"authenticationMethod":
"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😞
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<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>"
</script>
<title>Page Redirection</title>
</head>
<!-- <body>
<!-- Note: don't tell people to `click` the link, just tell them that it is a link. -->
Logging out.......
<br><br>
If you are not redirected automatically, follow this <a href='<url to the application>'>link</a>.
</body> -->
</html>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
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?
Thanks.
Regards,
Ben
Yes, I found and I have updated it in the same thread on Aug 08, 2017 at 10:46 AM. Answer Link
If you are having trouble in this, please share your code I can help.
Thanks @Jithin Kumar, this solution works!
Hello Jithin,
On my side, when I use this technique, it reloads the application already logged on. I am still not able to kill the session. I am weel redirected to the logout page, but if I reload the page I am automatically authenticated.
Any idea on what can be causing this?
Thank you for your attention
Best
JA
Hi Jithin.
App is trying to redirect to the following url but it is getting 404 error. Please help.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.