title: Setting firebase.User in vuex results in eternal loop
body: <p>UPDATE: This error only occurs with vuex strict mode enabled</p>
  <p>I am building a Vue application with firebase authentication, but the application fails with the following error messages:</p>
  <blockquote>
  <p>[Vue warn]: Error in callback for watcher &quot;function () { return this._data.$$state }&quot;: &quot;Error: [vuex] Do not mutate vuex store state outside mutation handlers.&quot;</p>
  <p>Error: [vuex] Do not mutate vuex store state outside mutation handlers.</p>
  <p>Uncaught RangeError: Maximum call stack size exceeded</p>
  </blockquote>
  <p>The error occurs when i commit the user to my Vuex store in my main.ts file:</p>
  <pre><code>firebase.auth().onAuthStateChanged(user =&gt; {
    if (user) {
      store.commit(constants.auth.SET_USER, user) // THIS LINE
      store.commit(constants.auth.SET_AUTHENTICATED, true)
      router.push('/')
    } else {
      store.commit(constants.auth.SET_USER, null)
      store.commit(constants.auth.SET_AUTHENTICATED, false)
      router.push('/signup')
    }
    if (!app) {
      app = new Vue({
        router,
        store,
        render: (h) =&gt; h(App),
      }).$mount('#app')
    }
  })
  </code></pre>
  <p>Here is my mutation:</p>
  <pre><code>[constants.auth.SET_USER](state: AuthState, payload: firebase.User): void {
        state.user = payload
  }
  </code></pre>
  <p>I can tell from Vue devtools, that the mutation actually happens, and that the user is committed to the store, but i have no idea why this error occurs. Can you help me?</p>
  <p>I've tried commenting out nearly everything else in the application, and these are the only parts that cause any trouble.</p>