Mediv0
Problem getting data from Pinia
I have a component used within my layout that is responsible for setting user information. However, when I try to access this user info from another component located deeper in the component tree, it returns null.
navbar.vue
test.vue
i logged them and it seems the problem is that test.vue runs before navbar.vue
file structure
- dashboardLayout
-- navbar.vue // -> getting data here
-- TestLayout
--- AComponent.vue
---- Test.vue // -> runs here
6 replies
Implement http-only jwt tokens with retry
Hi,
I’m trying to refresh the access token when I receive a 401 error and retry all pending requests. I could use onResponse and onRequest.
Something like this:
This works fine when you only have one request at a time, but when you have multiple requests on the page:
It just doesn't work (multiple
refreshToken
calls). Any ideas on how to approach this?5 replies