Prefetch inside app.vue only executed after router calls beforeEnter



  • I want to subscribe to firebase.auth state inside the app.vue and fill the store with the user data. I thought this should run only one time at app startup similar to the previously used boot plugin. Inside the router I ask the store if the user is logged in and proceed depending on the state.

    But currently the router calls beforeEnter before the app.vue prefetch is executed, meaning the user is never logged in at first run.

    How can I change this behavior or is there a better place to subscribe to firebase.auth state?