My app uses Firebase Auth for authentication. While the user is logged in, they get an ID token which is valid for 1 hour (non-configurable). The front-end is supposed to call a function await user.getIdToken()await user.getIdToken() to refresh this token.
Is there a way that I can have the frontend try a request, examine the response, potentially call this function if the server tells me the token is expired, and then retry? I want this to happen without triggering the onError() callback for all of my queries / mutations if possible.
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
t
tRPC
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.