Patryk Makowski
Explore posts from serversTTCTheo's Typesafe Cult
•Created by Patryk Makowski on 11/29/2023 in #questions
@ts-oss/env-core server env schema type error
1 replies
Get the type of context after middleware
How can I get the type of the context of
adminProcedure
from
export const adminProcedure = publicProcedure.use(isAdmin)
?
https://trpc.io/docs/server/middlewares1 replies
TTCTheo's Typesafe Cult
•Created by Patryk Makowski on 3/27/2023 in #questions
custom handleChange
2 replies
TTCTheo's Typesafe Cult
•Created by Patryk Makowski on 3/18/2023 in #questions
Clerk? Centralised Auth
I need auth provider that can be used:
- In web app (Next.JS 13)
- In mobile app (Prob. React Native - Expo)
- In custom BE facing external customers (Prob. Apollo GraphQl - https://github.dev/howtographql/typescript-apollo)
I'm trying to find out if Clerk is good for this or not but I'm not sure what I'm looking for. Does someone have experience in working with this stack?
1 replies
TTCTheo's Typesafe Cult
•Created by Patryk Makowski on 2/19/2023 in #questions
Getting one of optional types
Hi everyone, how can I get one of the types of | type? I can't create subtypes as the type is generated (Sub1 | Sub2 is impossible). https://www.typescriptlang.org/play?#code/C4TwDgpgBAogHgQwLZgDbQLxQN4CgoFQD6RokAdshAFxQBEAigK4QBOId+hSECAzk1YQ+tPIXHFS4CJR606ERCnQBGThMIALCNtp9grAJbkA5lwIBfXBagAfHOclkZVeczYdHPfoOGjH4iTOsjT0ishoEABM6hpQwMLAegbGZuJWVrgA9FlQmgD2AO5QAMYI5FCGUCYQwFD55ND5AGbxBXzQznwA-LjOUABKwkyowCpQWGKEQdIhbizssQQ8fAJCIg5xTrOuYUqRagFaOqH6RqaOGbjZuf1DAqMTUADK+TwA4jJshiUAYkzkEoAHngEXQABo6N41sI6OC9mCIGoAHw3eqsKB8N61TSpKCoQwAa06uL4QA
5 replies
TTCTheo's Typesafe Cult
•Created by Patryk Makowski on 2/4/2023 in #questions
Underscore variable is still triggering eslint `no-unused-vars`. Why?
10 replies
TTCTheo's Typesafe Cult
•Created by Patryk Makowski on 1/19/2023 in #questions
Building CT3 app with docker - libssl error
When building ct3 app I get an error saying that in
prisma generate
it can't load libssl package. I've done it before like a milion times in 2022 and it worked. I haven't changed anything in dockerFile since and it is just copied from the docs.
Error:
34 replies
TTCTheo's Typesafe Cult
•Created by Patryk Makowski on 1/15/2023 in #questions
NextAuth user in middleware
Hi, I want to get user in the middleware so I can do conditional redirection of the users that don't have specific property yet defined. Like an onboarding screen. How can i get user in the middleware to have something like this:
https://nextjs.org/docs/advanced-features/middleware#conditional-statements
24 replies
TTCTheo's Typesafe Cult
•Created by Patryk Makowski on 12/14/2022 in #questions
Headless UI not working with NextJs 13 app dir
I copied just simple example from docs of Headless UI of Disclosure and without any errors it just doesn't work .
16 replies
TTCTheo's Typesafe Cult
•Created by Patryk Makowski on 12/11/2022 in #questions
Zod discriminatedUnion
Hi guys, I have na union type as follows:
I want to get typesafe value from form to properly map questions.
Currently I've done this:
But i still get an error
Property 'questions' does not exist on type '{ answer: string; sectionType: "single"; sectionName: string; }
when used like this:
2 replies
TTCTheo's Typesafe Cult
•Created by Patryk Makowski on 11/28/2022 in #questions
NextAuth middleware
I don't know why when I'm using NextAuth middleware and I successfully log In (I can see session when I disable middleware and use useSession hook on index page) it still redirects me to login page 😕
9 replies
CAS Authentication
So long story short. My University is using CAS as authentication provider. I was thinking that I could use NextAuth with it to authenticate my users but I have no clue how am I supposed to do that. They don't support OAuth2 because they have old version of CAS. I asked on GH discussion in NextAuth for help but didn't get any. I also tried seeking help on Theo's discord twice this month but no luck. I don't know what to do and I feel like people working there have no clue what to do. I really want to be using TRPC with NextJS as I love this combo but how on earth can I authenticate my users using something like this?
I was told I could use this lib https://www.npmjs.com/package/node-cas-client
13 replies
TTCTheo's Typesafe Cult
•Created by Patryk Makowski on 11/16/2022 in #questions
CAS with nextAuth
I have tremendous problem wrapping my head around this. My University is using CAS as authentication provider and I want to use it with NextAuth as Social Login. Does anyone have any idea how can I implement it? I'm pretty blue about authentication systems and I can't figure where to even start.
1 replies
TTCTheo's Typesafe Cult
•Created by Patryk Makowski on 11/9/2022 in #questions
ping.gg logo
Hi guys, is there anywhere available ping logo as svg? My girlfriend is working on logo animation for a university project and i thought it might be cool to do ping logo. Theo? Are you cool with that?
5 replies
TTCTheo's Typesafe Cult
•Created by Patryk Makowski on 11/2/2022 in #questions
How can I get history in NextJS? Or just Focus on item I redirected user from when he comes back
I need to focus on the item my user was redirected from to details page when he comes back. To do so I figured I need to have focus func in my general info page (
/users/
) and focus if someone is redirected to it from details page (/user/{id}
). Do I need to get that id to focus on that item?19 replies
TTCTheo's Typesafe Cult
•Created by Patryk Makowski on 11/1/2022 in #questions
Is there Ct3a Dockerfile example for publishing site this way? Or should I just use standard nextjs
As in title
7 replies
TTCTheo's Typesafe Cult
•Created by Patryk Makowski on 10/24/2022 in #questions
Anyone CAS magican?
1 replies
TTCTheo's Typesafe Cult
•Created by Patryk Makowski on 10/1/2022 in #questions
what do you guys think about this?
2 replies