Marceau
Explore posts from serversPPrisma
•Created by Marceau on 5/7/2025 in #help-and-questions
What is the recommended way to use Prisma types on the front-end?
I'm mostly asking this because, while using
Prisma.<Model>GetPayload
and something like nitropack
's SerializeObject
type utility works fine, it feels cumbersome and more importantly, it seems to bring the performance of the editor's TypeScript language server down to a crawl, which impedes the pace of development massively.
So I am wondering what's the best way to interface with Prisma types on the client, considering that the data received from the server will be serialized, meaning the generated types won't match as the returned output.2 replies
PPrisma
•Created by Marceau on 4/29/2025 in #help-and-questions
How to access the DMMF after version 6.6.0?
Hi, I had a script I was using that reading from
Prisma.DMMF
, but since the past couple updates, this code path no longer seems accessible... Is there a new way to work with the DMMF? Otherwise it's quite complicated to interact with the structure of your own database for anything...4 replies
PPrisma
•Created by Marceau on 4/23/2025 in #help-and-questions
How to make a library/package that expects a Prisma client with a certain schema?

3 replies
BABetter Auth
•Created by Marceau on 3/24/2025 in #help
Enforce Email Domain Restriction with Google Sign-In
https://www.better-auth.com/docs/concepts/hooks#example-enforce-email-domain-restriction
Is there an easy way to do the same as the example above, but when using Google as a social sign in? I use Google Workspace at my work and we have custom domains, so I want to be able to verify if we're logging in with a Google account from that workspace. I'd like to be able to change where I'm sending the user depending on their email.
I've tried many things, like throwing
APIError
inside of mapProfileToUser
or getUserInfo
, but it doesn't trigger a redirection to /api/auth/error
, which I could have short-circuited to maybe do what I want, but it didn't work out.
As far as I can see there's no easy way to intercept/read data as you're trying to log in through a social provider, only when creating an account, through database hooks, but I would like to intercept any sign-in whatsoever.8 replies