[Vuejs]-Error: [vuex] Do not mutate vuex store state outside mutation handlers with Firebase Auth Object

3👍

Found the answer.

https://firebase.nuxtjs.org/guide/options/#auth

signInWithEmailAndPassword(this.email, this.password)
.then(cred)

“Do not save authUser directly to the store, since this will save an object reference to the state which gets directly updated by Firebase Auth periodically and therefore throws a vuex error if strict != false.”

Credential object is constantly being changed by the firebase library and passing the credential object is just passing a reference not the actual values itself.

The solution is to just save the values within the object.

👤limjix

Leave a comment