Custom header
The headers option can be customized in the config when using the httpBatchLink or the httpLink.
headers can be both an object or a function. If it's a function it will get called dynamically for every HTTP request.
utils/trpc.tsts
utils/trpc.tsts
Example with auth login
pages/auth.tsxts
pages/auth.tsxts
The token can be whatever you want it to be. It's entirely up to you whether that's just a client-side
variable that you update the value of on success or whether you store the token and pull it from local storage.