craftzcode
Explore posts from serversTTCTheo's Typesafe Cult
•Created by craftzcode on 4/12/2025 in #questions
Always failed to fetch the image url

1 replies
BABetter Auth
•Created by craftzcode on 4/11/2025 in #help
Problem When Updating the User in the Session

8 replies
BABetter Auth
•Created by craftzcode on 4/8/2025 in #help
Is there an expiration of the email verification token?
I need to determine whether the email verification token expires. If it does, I plan to create a dedicated "Account Confirmation" page that indicates when the token has expired and displays a "Resend activation link" button. Additionally, I want to know the duration (in hours) for which the token is valid and how to capture an error if the token has expired.
38 replies
BABetter Auth
•Created by craftzcode on 4/7/2025 in #help
Issues with Skeleton Loading Not Displaying for Session-Based Components

6 replies
BABetter Auth
•Created by craftzcode on 4/6/2025 in #help
What is the best approach when handling the protected and unprotected routes
I designed a layout for the
sign in
and sign up
pages with the goal of redirecting any authenticated user straight to the home page (/
). However, when I navigate to either the sign in or sign up page while already having an active session, the page content briefly renders before the redirect occurs. Additionally, I encounter the following error:
Here is the relevant code:
8 replies
BABetter Auth
•Created by craftzcode on 4/6/2025 in #help
Better Auth Error Session data is too large to store in the cookie
I'm always getting this error whenever I tried to sign up.
Here's my
auth instance
5 replies
Prefetching with tRPC: Using hono.js/Express adapter and Next.js
If I use
Hono.js
or Express
as the adapter for tRPC
and my frontend is Next.js
, will I be able to utilize the prefetch
features referenced in Set up with React Server Components1 replies
What is the best approach when using monorepo with tTPC
What is the best approach when configuring tRPC inside of monorepo? I would like it to be used in Next.js, I create an
internal library
for tRPC
example packages/api
so I can call it anywhere in monorepo, now I would like to know where exactly is the best place for the client.tsx
and for the tRPC caller for Server Components
which is the server.tsx
can I place it also inside of the internal library of tRPC or I will place it inside of Next.js which is on apps/web
.1 replies
Integrating Hono.js with tRPC in Next.js: Routing and Context Considerations
I want to combine Hono.js with tRPC. I followed the guide on the 3rd party middleware made by hono for a tRPC server, and now I have set up the hono tRPC server 3rd party middleware similar to the code below:
I used
Hono.js
as a web server because I wanted to achieve the light and ultrafast web server capabilities of Hono.js
.
I got confused with the documentation for tRPC
and Hono.js
because, with tRPC
, they also have their own API route setup in Next.js specifically, the route at src/app/api/trpc/[trpc]/route
, and Hono.js
also has its own API route setup in Next.js
namely, the route at src/app/api/[[...route]]/route.ts
. So, I don’t know which one I should follow to use the 3rd party library created by Hono.js
, which is @hono/trpc-server
.
Now, where should I place this code in Next.js? Should it go in app/api/[[...route]]/route.ts
or in app/api/trpc/[trpc]/route.ts
?
Also, what is the best approach regarding context—should I use the tRPC context or the Hono.js context?2 replies
Integrating hono.js with tRPC in Next.js: Routing and Context Considerations
I want to combine Hono.js with tRPC. I followed the guide on the 3rd party middleware made by hono for a tRPC server, and now I have set up the hono tRPC server 3rd party middleware similar to the code below:
Now, where should I place this code in Next.js? Should it go in
app/api/[[...route]]/route.ts
or in app/api/trpc/[trpc]/route.ts
?
Also, what is the best approach regarding context—should I use the tRPC context or the Hono.js context?21 replies