Huge work

This commit is contained in:
Karolis Kundrotas
2021-10-25 22:00:01 +03:00
parent c3bb8983ef
commit aff6f8df82
26 changed files with 578 additions and 68 deletions

View File

@@ -52,7 +52,15 @@ const getters = {
},
userId(state, getters) {
if (!getters.isValid) return null
return state.tokenData.email
return state.tokenData.sub
},
isExpiringSoon(state, getters) {
if (!getters.isValid) return false
return true
},
expires(state, getters) {
if (!getters.isValid) return 0
return new Date(state.tokenData.exp * 1000)
},
loginUrl(state, getters) {
if (!getters.isReady) return null