updates to profile and login code

This commit is contained in:
Tobias Kurze
2019-04-08 10:43:17 +02:00
parent 9a91f40c65
commit a15e0c2d50
4 changed files with 39 additions and 17 deletions

View File

@@ -4,7 +4,9 @@
<section class="hero is-primary">
<div class="hero-body">
<div class="container has-text-centered">
<h2 class="title">Profile ({{tokenValidity}})</h2>
<h2 class="title">Profile</h2>
<h3 class="title">Token validity ({{tokenValidity}})</h3>
<h3 class="title">Refresh token validity ({{refreshTokenValidity}})</h3>
<p>{{profile.id}}</p>
<p class="subtitle error-msg">{{ errorMsg }}</p>
</div>
@@ -24,6 +26,7 @@
email: '',
errorMsg: '',
tokenValidity: -1,
refreshTokenValidity: -1,
};
},
methods: {
@@ -43,6 +46,7 @@
window.setInterval(() => {
this.$log.debug(getRemainingJwtValiditySeconds(this.$store.state.access_token));
this.tokenValidity = getRemainingJwtValiditySeconds(this.$store.state.access_token);
this.refreshTokenValidity = getRemainingJwtValiditySeconds(this.$store.state.refresh_token);
}, 1000);
});