Codex
Explore posts from serversTTCTheo's Typesafe Cult
•Created by Codex on 8/22/2024 in #questions
React Error
Solved it, I guess typescript was just being stupid with that file (I had to delete it and recreate it for anyone who runs into this issue).
4 replies
TTCTheo's Typesafe Cult
•Created by Codex on 4/9/2024 in #questions
trpc context not passed correctly
Finally this is what is creating the session.
What is happening is that when the front end calls the session I properly get the role inside session.user.role.
Moving from the front end to the actual API calls, the first time it creates the session in the middleware it is going through my session callback, and the session when logged DOES come with role and userId,
However once it is returned it somehow loses those two values, and the context is set without those two.
Any help is much appreciated thanks in advance.
Setup:
T3: Nextauth, Nextjs pages router, trpc, typescript and prisma.
Node version: 18.18.1
3 replies
TTCTheo's Typesafe Cult
•Created by Mocha on 3/5/2024 in #questions
TRPCClientError: Unexpected token 'A', "An error o"... is not valid JSON
It might be that vercel is timing out if you don't have the pro version
10 replies
TTCTheo's Typesafe Cult
•Created by Wiznet on 1/17/2024 in #questions
Next-auth.js: Redirect to custom URL after successful login.
You could probably force them out of it with a router.push("/home") not sure if its the best practice though
7 replies
TTCTheo's Typesafe Cult
•Created by Codex on 9/18/2023 in #questions
Question about useQuery
Thankyou in advance
8 replies
TTCTheo's Typesafe Cult
•Created by Codex on 9/18/2023 in #questions
Question about useQuery
Could you send me the link please? I looked for it but I only found 2 videos on Twitter from him and neither are recreating it
8 replies
TTCTheo's Typesafe Cult
•Created by Codex on 9/18/2023 in #questions
Question about useQuery
I managed to fix it with a workaround but I would still like to hear about a different solution because I don't think mine is ideal thankyou
8 replies