Redirect authenticated users nuxt js
问题 I have the following code from my state to handle the login request and load the incoming data to state. export const state = { userId: "", token: "", authenticated: false }; export const getters = {}; export const actions = { async login({ commit, dispatch }, formData) { //codes to get data from server goes here // incoming datas are {status: true,token: 'token123', userId: '123'} const remainingMilliseconds = 60 * 60 * 1000; const expiryDate = new Date(new Date().getTime() +