openapi-react-query-codegen
openapi-react-query-codegen copied to clipboard
How to add refresh token logic?
I'm using auto generated service.gen.ts and core.ts file. In layout.tsx file for passing token in header I have done like this:
useEffect(() => {
OpenAPI.interceptors.request.use((config) => {
const { token } = getToken()
config.headers = {
Authorization: token ? `Bearer ${token}` : '',
}
return config
})
}, [])
Similarly, how to add refresh token logic?
cc: @7nohe