The recommended approach for setting up a SPA with tRPC is to use the Singleton Pattern (source). However, many authentication libraries rely on providers and hooks to supply the authenticated user, meaning the
access_token
access_token
is only accessible within React land.
Given this, what is the recommended method to include the
access_token
access_token
in the tRPC headers? Can this be achieved using the Singleton Pattern, or is it necessary to use
We are excited to announce the new TanStack React Query integration for tRPC is now available on tRPC's next-release. Compared to our classic React Query Integration it's simpler and more T...