As you know, nuxtjs is server side rendering and there is no good example how to store data into localstorage which is client side.
My work is need to build login form w
nuxtjs provides you with process.browser to tell it to execute only on the client side
process.browser
so use it like this:
methods:{ storeToken(token){ if(process.browser){ localStorage.setItem("authToken", token); } } }
see this link for more info