DevR
Next-auth session not being fetched in tRPC context
So the problem happens when I am using a
protectedProcedure
. I get this error:
publicProcedure
work fine. I am not sure but I think the context is not being initialized properly or something like that. Tried many ways but still unsolved. Your help would mean a lot to me 🙏20 replies
Next-auth session not being fetched in tRPC context
I have got both next-auth and tRPC setup in my next.js app. When I try to fetch the session outside any tRPC route or middleware, It gets resolved properly. I guess Next-auth is working properly the problem is when I try to fetch a session within a tRPC route or middleware. I get null as a result, the user gets
UNAUTHORIZED
response.20 replies