Ammar Pasha
Ammar Pasha
TTCTheo's Typesafe Cult
Created by Ammar Pasha on 5/28/2023 in #questions
tRPC API calls log user out automatically
thanks for the help!
10 replies
TTCTheo's Typesafe Cult
Created by Ammar Pasha on 5/28/2023 in #questions
tRPC API calls log user out automatically
I ended up copying each file one by one to a new project and that fixed the issue 🤷‍♂️
10 replies
TTCTheo's Typesafe Cult
Created by Ammar Pasha on 5/28/2023 in #questions
tRPC API calls log user out automatically
Here's my _app.tsx if this is what you mean:
const MyApp: AppType<{ session: Session | null }> = ({
Component,
pageProps: { session, ...pageProps },
}) => {
return (
<SessionProvider session={session}>
<Layout session={session}>
<Component {...pageProps} />
</Layout>
</SessionProvider>
);
};

export default api.withTRPC(MyApp);
const MyApp: AppType<{ session: Session | null }> = ({
Component,
pageProps: { session, ...pageProps },
}) => {
return (
<SessionProvider session={session}>
<Layout session={session}>
<Component {...pageProps} />
</Layout>
</SessionProvider>
);
};

export default api.withTRPC(MyApp);
I have tried removing the layout but I still get the same outcome.
10 replies
TTCTheo's Typesafe Cult
Created by Ammar Pasha on 5/28/2023 in #questions
tRPC API calls log user out automatically
Could you elaborate? I'm fairly new to web development
10 replies
TTCTheo's Typesafe Cult
Created by Ammar Pasha on 5/28/2023 in #questions
tRPC API calls log user out automatically
I don't have any middleware (unless it came with create-t3-app)
10 replies