BA
Better Authโ€ข2mo ago
MrSquaare

Astro + Drizzle + Cloudflare D1

Hello, Is there a way to properly setup Better Auth with Drizzle + D1 on Astro? Since the D1 DB is only accessible in the Astro context (in an .astro page or in a API Route), it is not possible to return an โ€œauthโ€ constant. Is there another way? Thanks ๐Ÿ™‚
1 Reply
pavi2410
pavi2410โ€ข7d ago
found anything? Mocking env just worked
const env = { DB: {} as D1Database };
const env = { DB: {} as D1Database };

Did you find this page helpful?