I'm coding a test website with NodeJS .
I use Vue and Nuxt for the client-side.
I use the auth library of Nuxt JS for user signup.
The problem is that in Vuex no logged in user is displayed and no user is logged in.
My signup code is :
let data = {
name : this.name ,
email : this.email,
password : this.password
}
let response = await this.$axios.$post(`/api/auth/signup` , data);
console.log(response)
await this.$auth.loginWith('local' , {
data : {
email : this.email ,
password : this.password
}
});
await this.$router.push('/')
and my auth options of nuxt.config.js is :
auth: {
localStorage : true ,
strategies: {
local: {
endpoints: {
login: { url: '/api/auth/login', method: 'post', propertyName: 'token' },
user: { url: '/api/auth/user', method: 'get', propertyName: 'user' }
}
}
}
}
this is my state of vuex user is showing : enter image description here
what is exactly my problem??