tRPCttRPC
Powered by
MugetsuM
tRPC•4y ago
Mugetsu

AccessToken for API calls

What would be the best approach to pass the AccessToken from NextAuth Session to the Http Client which is being called from tRPC procedures to access external API??

Should I attach the AccessToken to the request object from NextAuth session callback and then provide it to the HttpClient instance in the tRPC context initialization for the request?? Or is there better alternative to handle this?
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Caching API calls (HTTP response)
Answer OverflowAAnswer Overflow / ❓-help
2y ago
Any Benefit using tRPC for only remote api calls?
maxpowernzMmaxpowernz / ❓-help
3y ago
passing user input state variable to all api calls
SkyGuySSkyGuy / ❓-help
3y ago
External calls
Adrian LysakowskiAAdrian Lysakowski / ❓-help
3y ago