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

auth: don't emit the auth property more than needed

_setLoginStatus takes care of that anyway.
parent 7ba333c4
Branches
No related tags found
No related merge requests found
......@@ -99,7 +99,6 @@ export class AuthKeycloak extends AdapterLitElement {
}
this.personId = personId;
this.sendSetPropertyEvents();
this._setLoginStatus(LoginStatus.LOGGED_IN, tokenChanged || newPerson);
} else {
if (this._loginStatus === LoginStatus.LOGGED_IN) {
......@@ -111,7 +110,6 @@ export class AuthKeycloak extends AdapterLitElement {
this.personId = "";
this.person = null;
this.sendSetPropertyEvents();
this._setLoginStatus(LoginStatus.LOGGED_OUT);
}
......@@ -133,13 +131,11 @@ export class AuthKeycloak extends AdapterLitElement {
.then(response => response.json())
.then((person) => {
that.person = person;
this.sendSetPropertyEvents();
this._setLoginStatus(this._loginStatus, true);
});
} catch (error) {
console.warn(error);
that.person = null;
this.sendSetPropertyEvents();
this._setLoginStatus(this._loginStatus, true);
}
}, {}, that.lang);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment