You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have multiple API services, and I’m wondering if I need to add authentication headers, refreshToken, and shouldRefreshToken to every service. Manually including them in each request seems uncomfortable, but I also don’t want all API calls to be in a single file. I prefer to keep them organized in separate service files. Is there a way to handle authentication headers and token refreshing automatically while keeping API services modular?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have multiple API services, and I’m wondering if I need to add authentication headers,
refreshToken
, andshouldRefreshToken
to every service. Manually including them in each request seems uncomfortable, but I also don’t want all API calls to be in a single file. I prefer to keep them organized in separate service files. Is there a way to handle authentication headers and token refreshing automatically while keeping API services modular?Thanks
Beta Was this translation helpful? Give feedback.
All reactions