Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logoff function on local environment #1021

Open
jGluchConsalit opened this issue Jun 13, 2024 · 2 comments
Open

Logoff function on local environment #1021

jGluchConsalit opened this issue Jun 13, 2024 · 2 comments
Labels
author action Waiting for feedback by issue author help wanted Extra attention is needed

Comments

@jGluchConsalit
Copy link

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 localServer:host/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:
localServer:host/sap/opu/odata/SAP/SERVICE_NAME

Many thanks for help!

@petermuessig
Copy link
Member

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

@petermuessig petermuessig added help wanted Extra attention is needed author action Waiting for feedback by issue author labels Jun 15, 2024
@jGluchConsalit
Copy link
Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author action Waiting for feedback by issue author help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants