Skip to content
Snippets Groups Projects
Commit 7100ed44 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Handle logout being aborted in beforeunload

If the page prevents the default handler in beforeunload the logout
never occurs and we end up in an endless transient "logging-out" state.

Prevent this by reverting the login status back in that case.
parent 4b3a9afd
No related branches found
No related tags found
No related merge requests found
......@@ -270,6 +270,11 @@ export class Auth extends ScopedElementsMixin(VPULitElement) {
this._setLoginStatus(LoginStatus.LOGGING_OUT);
}
this._kcwrapper.logout();
// In case logout was aborted, for example with beforeunload,
// revert back to being logged in
if (this._loginStatus === LoginStatus.LOGGING_OUT) {
this._setLoginStatus(LoginStatus.LOGGED_IN);
}
}
update(changedProperties) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment