blinkblinko
Explore posts from serversTTCTheo's Typesafe Cult
•Created by blinkblinko on 3/22/2024 in #questions
Calling public trpc procedure redirects user to custom signin, causing an infinite loop
I have a custom sign in page, set up with next-auth middleware. This sign in page calls a public procedure of a trpc router. It loops forever until crash. Enabling DEBUG=* I see that there is a loop because the public trpc route seems to redirect to the sign in page, which then calls the procedure, which then redirects again, so on. All SSR. The proc is just returning a simple static object so wondering how a next auth redirect got in the mix.
6 replies