parent
963837ef1d
commit
dd40b0d9b9
|
@ -12,10 +12,6 @@ export function parseToken (token) {
|
|||
|
||||
const data = JSON.parse(Base64.decode(parts[1]))
|
||||
|
||||
if (Math.round(new Date().getTime() / 1000) > data.exp) {
|
||||
throw new Error('token expired')
|
||||
}
|
||||
|
||||
localStorage.setItem('jwt', token)
|
||||
store.commit('setJWT', token)
|
||||
store.commit('setUser', data.user)
|
||||
|
|
Loading…
Reference in New Issue