on 2024 Jun 12 1:58 PM
Dear everyone,
I'm creating my first web application in OpenUI5, and have encountered a wall in the form of logging out of the application. Currently, I am automatically logged out when I close the browser or manually clear session cookies in the browser.
I have tried to do the same with a function that works and clears the cookies, but when I refresh the page the cookies come back and I am still logged in.
I connect to the local server using ‘ui5-middleware-simpleproxy’. And everything is working locally.
I have also tried the option with <localServer:host>/sap/public/bc/icf/logoff
After entering the clink, I get a lovely logout message, but, when I try to enter the server, I am still logged in.
I would really appreciate your help on how to implement logging out of the application. I must admit that I am running out of ideas. Maybe my backend team should do something about it?
Ps: The login option is working in the element I created, only I am annoyed by the pop-up that prompts me to login. Is there any way to remove it?
When I'm login, I use this path:
<localServer:host>/sap/opu/odata/SAP/SERVICE_NAME
Many thanks for help!
Request clarification before answering.
Hi Jakub,
Why would you try to logout? Any particular reason? If you have your app open, there should be a connection, right?
If you need this for switching users, I'd say have a look at Chrome profiles. You can create multiple users for testing purpose, without closing your application.
So what is your use case to logoff?
Regards,
Noël
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Noel,
I just woudl like to have that kind of option. Maybe it's my habit from programming React apps. I just think it's a nice option, and now every webapp shodul have that option.
So, to be sure, this is not possible and that I should use the change of profiles on the browser but simply switch it off?
Best regards,
Nice to see you try our UI5 platform as well as a React developer!
Do you have a standard application or do you use the launchpad functionality as well?
If you are using the launchpad also, you could trigger a logout sap.ushell.Container.logout()
Maybe you can invalidate your session somehow. It is stored in your session cookies indeed.
(https://www.npmjs.com/package/ui5-middleware-simpleproxy)
I have never seen this use case in UI5 to be honest 🙂
User | Count |
---|---|
31 | |
9 | |
6 | |
6 | |
6 | |
6 | |
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.