routed_auth_sqlite 0.1.0 copy "routed_auth_sqlite: ^0.1.0" to clipboard
routed_auth_sqlite: ^0.1.0 copied to clipboard

Durable SQLite AuthStore persistence for Routed applications running on Dart IO.

routed_auth_sqlite #

Durable SQLite persistence for package:server_auth applications running on Dart IO. The package exposes the same typed stores and transactional plugin capabilities as the Cloudflare D1 adapter, backed by a local SQLite database file or an in-memory database for isolated tests.

import 'package:routed_auth_sqlite/routed_auth_sqlite.dart';
import 'package:server_auth/server_auth.dart';

final authStore = await SqliteAuthStore.openPath('var/auth.sqlite');

final options = AuthOptions<MyRequestContext>(
  store: authStore,
  providers: [CredentialsProvider()],
);

// Close the store during application shutdown.
authStore.close();

SqliteAuthStore.openPath applies idempotent, append-only migrations before returning the store. Use SqliteAuthStore.openInMemory for tests and local development. Production applications should use a durable file and configure backups, file permissions, encryption, and process ownership according to their deployment environment.

The adapter reuses the framework-neutral AuthStore contracts and the same bounded digest-only API-key, WebAuthn, phone, anonymous, OAuth, and SCIM storage semantics as the D1 SQL adapter. Run AuthStoreConformanceSuite against any wrapper or fork before deploying a custom SQLite topology.

This package is Dart IO only because sqlite3 uses native SQLite bindings on the host. Cloudflare Workers applications should use package:routed_auth_cloudflare instead.

0
likes
130
points
171
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Durable SQLite AuthStore persistence for Routed applications running on Dart IO.

Repository (GitHub)
View/report issues

Topics

#routed #authentication #sqlite

Funding

Consider supporting this project:

www.buymeacoffee.com

License

MIT (license)

Dependencies

path, routed_auth_cloudflare, routed_node, sqlite3

More

Packages that depend on routed_auth_sqlite