Request: Add Cloudflare D1 Adapter Driver #64

Closed
opened 2026-03-13 07:30:40 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @serban-mihai on GitHub (Oct 11, 2024).

I'm leaving this here since the project is new, we might discuss about adding an adapter driver for Cloudflare D1 (SQLite) binding.

Some examples of other auth libraries implementing it:

Originally created by @serban-mihai on GitHub (Oct 11, 2024). I'm leaving this here since the project is new, we might discuss about adding an adapter driver for Cloudflare D1 (SQLite) binding. Some examples of other auth libraries implementing it: - [Lucia Auth](https://github.com/lucia-auth/lucia/blob/main/packages/adapter-sqlite/src/drivers/d1.ts) (deprecated) - [NextAuth](https://github.com/nextauthjs/next-auth/tree/main/packages/adapter-d1)
Author
Owner

@Bekacru commented on GitHub (Oct 11, 2024):

You can use D1 dialect with the built-in Kysely adapter https://github.com/aidenwallis/kysely-d1. We don't plan to add specific adapters like this, if Kysely already supports them.

@Bekacru commented on GitHub (Oct 11, 2024): You can use D1 dialect with the built-in Kysely adapter https://github.com/aidenwallis/kysely-d1. We don't plan to add specific adapters like this, if Kysely already supports them.
Author
Owner

@nosovk commented on GitHub (Oct 11, 2024):

it would be nice to have an example, that works with D1

@nosovk commented on GitHub (Oct 11, 2024): it would be nice to have an example, that works with D1
Author
Owner

@Bekacru commented on GitHub (Oct 16, 2024):

it would be nice to have an example, that works with D1
Here’s an example.
https://github.com/Bekacru/better-auth-nextjs-cf-d1-example.git

@Bekacru commented on GitHub (Oct 16, 2024): > it would be nice to have an example, that works with D1 Here’s an example. https://github.com/Bekacru/better-auth-nextjs-cf-d1-example.git
Author
Owner

@zpg6 commented on GitHub (May 14, 2025):

Hello! I made an npm package called better-auth-cloudflare to ease+extend deploying Better Auth to Cloudflare, especially OpenNextJS projects. Easily integrate with D1 (via drizzle) and KV plus you can geolocate your users. There is a demo project in the repo with helper scripts for schema generation, migrating, and deploying. Feedback and contributions are welcome

DEMO: https://better-auth-cloudflare.zpg6.workers.dev/

better-auth-cloudflare GitHub:
https://github.com/zpg6/better-auth-cloudflare

better-auth-cloudflare NPM:
https://www.npmjs.com/package/better-auth-cloudflare

@zpg6 commented on GitHub (May 14, 2025): Hello! I made an npm package called` better-auth-cloudflare` to ease+extend deploying Better Auth to Cloudflare, especially OpenNextJS projects. Easily integrate with D1 (via drizzle) and KV plus you can geolocate your users. There is a demo project in the repo with helper scripts for schema generation, migrating, and deploying. Feedback and contributions are welcome DEMO: https://better-auth-cloudflare.zpg6.workers.dev/ better-auth-cloudflare GitHub: https://github.com/zpg6/better-auth-cloudflare better-auth-cloudflare NPM: https://www.npmjs.com/package/better-auth-cloudflare
Author
Owner

@HoaX7 commented on GitHub (Oct 6, 2025):

is there an example for better auth and kysely-d1 with tanstack start?

@HoaX7 commented on GitHub (Oct 6, 2025): is there an example for better auth and kysely-d1 with tanstack start?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#64