SparkS
tRPC2y ago
1 reply
Spark

tRPC deployed with Amazon API Gateway adapter, SST Ion, and Clerk auth

I am going through this https://ion.sst.dev/docs/start/aws/trpc/, but I don't know the best way to pass auth() from server Next.js to awsLambdaRequestHandler.

return createTRPCContext({
    event: ? // pass event.headers: heads?
    auth: auth(), // can't do this. idk best way to pass this through to awsLambdaRequestHandler and handle it
  });


I am doing
headers.set("Authorization", `Bearer ${authToken}`);
for Expo and that is working fine.
Was this page helpful?