groktruth
groktruth
Explore posts from servers
BABetter Auth
Created by groktruth on 2/25/2025 in #help
Need help to integrate BetterAuth with react-hook-form and zod in Remix
Hi, often time i need to validate the form data on the client-side first to improve UX, then validate it again on the server-side. To work with form and validation, i think react-hook-form and zod are one of the best choices right now but I can't find a way to integrate them properly with betterAuth and action-clientAction in Remix. Any insights would be great. Thanks guy. (Also, the docs for remix's integration is outdated, I think, Remix is now react-router v7. If I am wrong, just ignore this)
1 replies
BABetter Auth
Created by groktruth on 2/24/2025 in #help
Two types of user
Hi, I am currently building an app where it requires two types of user just like https://www.upwork.com/ where you have client as a type and freelancer as another type. I dont know if this is possible with betterauth or not. I see there is a plugin "admin" but not sure if it fits my usecase. Any insights would be really helpful. Thanks.
4 replies
CDCloudflare Developers
Created by groktruth on 3/24/2024 in #general-help
Nextjs's Images component is blocked by Cloudfare R2
Hi guys, i run into some troubles when configuring R2 with Vercel image optimization. So i stored my images in r2 and that bucket connects to my domain, which means it refuses to serve from all other domains but mine. But in my nextjs app, i am using Image component from nextjs that makes a request from, i dont know, maybe vercel's server, and it is blocked. I try to configure the CORS of my bucket like allows headers that have user agent, but it still doesnt work. Any ideas? Thanks
4 replies
CDCloudflare Developers
Created by groktruth on 3/3/2024 in #pages-help
Cloudfare R2 mismatches between 206 and 200 status code
I use cloudfare r2 to store and stream videos for my website. When i first play the video, the video works fine but when i forward to some point of the video, it restarts the video, playing from 00:00. The workaround is to reload the page, which is ofc not good for user experience. When i investigate the network log, i found out that the first time playing the video, the status code is 200. After reload the page, the status code is 206 - partial content. The issue gets worse once after i reload the page. When i try to seek to some points of the video, some of the requests are 206, but some are 200, which forces to download the large chunk of video in between. Is there a way to always make 206 requests to cloudfare r2. I am using Nextjs and videojs for streaming.
4 replies