tRPC API calls log user out automatically
Whenever I call a tRPC API route (protected or public), I immediately get logged out. I have no idea what I'm doing wrong. Here's my code:
4 Replies
Do you have some weird middleware somewhere doing some sort of side effect? This code looks fine from what I can tell
Do you also have the right context providers set up in the root of your component tree for next auth?
I don't have any middleware (unless it came with create-t3-app)
Could you elaborate? I'm fairly new to web development
Here's my _app.tsx if this is what you mean:
I have tried removing the layout but I still get the same outcome.
Solution
Hm, this verifies what I was wondering. Is the repo open source
I ended up copying each file one by one to a new project and that fixed the issue 🤷♂️
thanks for the help!