on 03-12-2020 11:21 AM
Hello All,
I am using one identity provider for login service in Sap ui5 app in SCP. But, when iam trying to logout from the ui5 app, it is directly redirecting again to app without asking user credentials. I have tried the following approaches but they didn't work.
1) Maintaining logout Page in neo-app.json so that SCP will automatically take care of logout behavior- didn't work.
2) Tried with logout endpoint in user api service - didn't work.
3) Used below method (only from clear authentication Cache process and modifying url link to SAP CLOUD PLATFORM odata Services)-- didn't work.
Could you please provide your help here.
Thank you.
Use the following Approach:
1. Maintain the logout.html page in under webapp folder.
<!DOCTYPE HTML>
<html>
<head>
<script type="text/javascript">
window.location.href = "./index.html"
</script>
<title>Page Redirection</title>
</head>
<body>
<h4>Logging out...</h4>
</body>
</html>
2. in neo-app.json, mention:
"logoutPage": "/logout.html",
3. In Controller, on the event, trigger logout page (Assuming your controller is also under controller folder in webapp folder):
sap.m.URLHelper.redirect("/logout.html", false);
Regards
Anmol
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anmol,
I have tried the above approach. Still, it is directly logging into the app after the logout page. I want to manually enter the credentials again when the user logs off.
Below is my logoff screen. when the user clicks on 'Log back on' button, it should redirect to IDP Providers login page. Yes, logout.html is under webapp folder only.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes it won't work in webide because the path of logout file in webide is in webapp folder. If you want to make it work in webide, you need to mention the path with /webapp/ but as per the scenario, we will be using the deployed app in the production environment, not in webide.
Hope it helps.
Please upvote and mark the answer as correct if it helped.
Regards
Anmol
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.