ui5-community / ui5-ecosystem-showcase

A repository showcasing the UI5 tooling extensibility to combine OSS tools for UI5 application development.
https://ui5-community.github.io/ui5-ecosystem-showcase/
Other
189 stars 91 forks source link

Logoff function on local environment #1021

Open jGluchConsalit opened 3 weeks ago

jGluchConsalit commented 3 weeks ago

Hello everyone,

I am struggling with a problem, or I just think it's a problem. Before you answer. Yes I asked the same question on SAP community and I was directed here.

Getting to the point:

I'm creating my first web application in OpenUI5 (the webapp is created with easy ui5 generator and I'm using TypeScript), 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 /sap/public/bc/icf/logoff

After entering the link, 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:

/sap/opu/odata/SAP/SERVICE_NAME Many thanks for help!
petermuessig commented 2 weeks ago

Hi @jGluchConsalit , I'm not the expert in the authentication scenarios but what I could imagine is that the cookies are still in the middleware although removed from the browser. What happens if you logout, restart the server and close and open the browser again. Are you then logged out?

I'm wondering if there's an easy way to reproduce this behavior so that we can spot the issue...

THX and BR, Peter

jGluchConsalit commented 2 weeks ago

Hi @petermuessig!

There are three ways to logoff for me right now.

The first one is to close web browser, and open it again. With that scenario I'm getting loggedoff. The second is to manually remove all cookies by entering the web browser settings and pressing the "clear browser cookies" button. After refresh I'm loggedoff. Deleting cookies in DevTools not working in that way. The third way to logoff is changing browser profile.

This is how it's look's like now.

Cheers!