Implemented auth renewal (#5)

This commit is contained in:
Daniel J. Summers
2017-10-08 21:58:36 -05:00
parent 3acec3dc25
commit 4db6d98011
3 changed files with 56 additions and 1 deletions
+1
View File
@@ -34,6 +34,7 @@ export default new Vuex.Store({
state: {
user: JSON.parse(localStorage.getItem('user_profile') || '{}'),
isAuthenticated: (() => {
this.auth0.scheduleRenewal()
if (this.auth0.isAuthenticated()) {
api.setBearer(localStorage.getItem('id_token'))
}