jbialon
jbialon
AAlokai
Created by jbialon on 9/25/2023 in #🙋|general-help
No request call on page refresh
Hello, Currently I'm playing with storefront-nuxt3-boilerplate + custom integration (sdk/api-client). Is anybody here have a problem with useAsyncData on page refresh? When I go too, for example /category by clicking on header, useAsyncData works perfectly fine and you can see request with proper response in network, BUT when you refresh that page (/category) than there is no request in network, and you can see null response in console.log after the call. Not sure if that topic is related https://github.com/vuejs/core/issues/5844 ?
5 replies
AAlokai
Created by jbialon on 8/22/2023 in #🙋|general-help
api client context in frontend app
Hi guys, I'm trying to build new integration using new Sdk Integration Boilerplate and I got stuck on how to get api-client context on frontend nuxt app. What I want to do is, to add token that i get from api-client/middleware response, after I get it on frontend app I want to save the token in app context so that api-client can take it and adds that Bearer token to header on every call. I have tried to add new fields to: packages/api-client/src/types/context/index.ts and read them here: playground/app/pages/methods/exampleMethod.vue but with no success. Maybe Its wrong idea to handle authentication token on frontend app, and it should only be handled on api-client?
8 replies