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
No related branches found
No related tags found
No related merge requests found
...@@ -99,7 +99,6 @@ export class AuthKeycloak extends AdapterLitElement { ...@@ -99,7 +99,6 @@ export class AuthKeycloak extends AdapterLitElement {
} }
this.personId = personId; this.personId = personId;
this.sendSetPropertyEvents();
this._setLoginStatus(LoginStatus.LOGGED_IN, tokenChanged || newPerson); this._setLoginStatus(LoginStatus.LOGGED_IN, tokenChanged || newPerson);
} else { } else {
if (this._loginStatus === LoginStatus.LOGGED_IN) { if (this._loginStatus === LoginStatus.LOGGED_IN) {
...@@ -111,7 +110,6 @@ export class AuthKeycloak extends AdapterLitElement { ...@@ -111,7 +110,6 @@ export class AuthKeycloak extends AdapterLitElement {
this.personId = ""; this.personId = "";
this.person = null; this.person = null;
this.sendSetPropertyEvents();
this._setLoginStatus(LoginStatus.LOGGED_OUT); this._setLoginStatus(LoginStatus.LOGGED_OUT);
} }
...@@ -133,13 +131,11 @@ export class AuthKeycloak extends AdapterLitElement { ...@@ -133,13 +131,11 @@ export class AuthKeycloak extends AdapterLitElement {
.then(response => response.json()) .then(response => response.json())
.then((person) => { .then((person) => {
that.person = person; that.person = person;
this.sendSetPropertyEvents();
this._setLoginStatus(this._loginStatus, true); this._setLoginStatus(this._loginStatus, true);
}); });
} catch (error) { } catch (error) {
console.warn(error); console.warn(error);
that.person = null; that.person = null;
this.sendSetPropertyEvents();
this._setLoginStatus(this._loginStatus, true); this._setLoginStatus(this._loginStatus, true);
} }
}, {}, that.lang); }, {}, that.lang);
......
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