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

[Feature Request]: Return a promise or observable from OidcSecurityService.logoffLocal(configId) #2066

Open
eliashakuni opened this issue Jan 17, 2025 · 0 comments

Comments

@eliashakuni
Copy link

Is your feature request related to a problem? Please describe.
The logoffLocal() function is asynchronous internally, even though it looks synchronous on the outside (it returns void). In the angular app that I'm currently working with, we have a forced reload of the page right after calling this function, which cancels everything that is currently going on. Meaning, when the page reloads, the current user is still logged in because logoffLocal() didn't have time to finish. This is a race condition, the behavior is inconsistent between browsers and mainly appears on Firefox (in our case).

Describe the solution you'd like
Like asynchronous functions usually do, it should return a promise or an observable, which would signal the user when the function has done its thing. It wouldn't even be a breaking change, since the user could just ignore the return value and use the function the same way as today.

Describe alternatives you've considered
Currently we have a fixed delay after the function, to give it time to finish, but that feels really awkward and clunky, not the way things should be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant