I need help accessing data stored in local storage using the testData() function. When I try, my console prints out {ob: Observer}. The data is set inside the login() function and I can see it in my browser.
Being new to front-end development, any assistance would be greatly appreciated.
Vue
testData() {
console.log(this.$auth.$storage.getUniversal('user'))
},
login() {
this.$auth.loginWith('local', {
data: {
username: this.username,
password: this.password
}
}).then(response => {
const user = response.data
this.$auth.setUser(user)
this.$auth.$storage.setUniversal('user', user.username, true)
})
},
localStorage