How to access Next Auth session or jwt from axios interceptor

my goal is to add the authorization header on the interceptor without doing it manually on every request except the function getServer() returns null and useSession is only used on the client obviously and the getServerSession needs access to the context
1 Reply
Shoodey
Shoodey14mo ago
I know i dont answer the question, but why are you using axios? - do your external api calls using fetch() from trpc (server side) where you have all your session info
Want results from more Discord servers?
Add your server