Skip to content

Comments

feat: add D1 storage adapter for Cloudflare D1 database#320

Open
swalker326 wants to merge 1 commit intoanomalyco:masterfrom
swalker326:feat/add-d1-storage
Open

feat: add D1 storage adapter for Cloudflare D1 database#320
swalker326 wants to merge 1 commit intoanomalyco:masterfrom
swalker326:feat/add-d1-storage

Conversation

@swalker326
Copy link

Add D1Storage adapter enabling OpenAuth to use Cloudflare's D1 serverless SQL database for storage.

Features:

  • Automatic table creation and indexing
  • TTL/expiry support with filtering on read
  • Efficient prefix-based scanning
  • Cleanup utility for expired entries

Add D1Storage adapter enabling OpenAuth to use Cloudflare's D1
serverless SQL database for storage. This enables true data isolation
for multi-tenant architectures where each tenant can have their own
isolated D1 database (up to 50k databases per account).

Features:
- Automatic table creation and indexing
- TTL/expiry support with filtering on read
- Efficient prefix-based scanning
- Cleanup utility for expired entries

Use case: Multi-tenant auth platforms can give each tenant their own
isolated D1 database for complete data separation.
@shpaw415
Copy link

hope it gets into prod... it's very helpful for multi-tenant applications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants