No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Prefetch inside app.vue only executed after router calls beforeEnter

    Help
    2
    3
    587
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      snp last edited by

      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?

      1 Reply Last reply Reply Quote 1
      • J
        J3m5 last edited by

        This!
        I’m in the same situation.
        I need to authenticate with an API call only once at start up and get the result before that the Router.beforeEach kicks in. I saw that the boot plugin will be deprecated in the next version so what’s the solution here?

        1 Reply Last reply Reply Quote 0
        • J
          J3m5 last edited by

          It’s been 2 month, did you find the solution @snp ?

          1 Reply Last reply Reply Quote 0
          • First post
            Last post