Once the user is logged in, I need to fetch some data from the server kind of like the nuxtServerInit strategy.
I created a $auth plugin which calls nuxtClientInit like detailed there.
It works if the page load happens when the user is already logged in.
But how can I make sure the action is also dispatched after sign in?
I could call it from my login.vue method, but it feels hacky and not the proper way to do this and the app wouldn't wait for the call to finish before rendering the next page which is something I need.
How can I intercept the very moment after login happens? Maybe I would have a chance with a middleware or something?
Once the user is logged in, I need to fetch some data from the server kind of like the
nuxtServerInit
strategy.I created a
$auth
plugin which callsnuxtClientInit
like detailed there.It works if the page load happens when the user is already logged in.
But how can I make sure the action is also dispatched after sign in?
I could call it from my
login.vue
method, but it feels hacky and not the proper way to do this and the app wouldn't wait for the call to finish before rendering the next page which is something I need.How can I intercept the very moment after login happens? Maybe I would have a chance with a middleware or something?
Cheers