Skip to main content

better_auth_allsource/
lib.rs

1//! Allsource `DatabaseAdapter` for [better-auth-rs](https://crates.io/crates/better-auth-core).
2//!
3//! Uses Allsource Core for event appending and Query Service for reads,
4//! eliminating the need for a separate SQL database for authentication.
5//!
6//! # Usage
7//!
8//! ```rust,ignore
9//! use better_auth_allsource::AllsourceAuthAdapter;
10//!
11//! let adapter = AllsourceAuthAdapter::new(
12//!     "http://localhost:3900",   // Allsource Core
13//!     "http://localhost:3902",   // Allsource Query Service
14//!     "my-tenant-id",
15//!     "ask_my-api-key",
16//! );
17//!
18//! let auth = BetterAuth::builder()
19//!     .database(adapter)
20//!     .build();
21//! ```
22
23mod adapter;
24mod client;
25mod error;
26
27pub use adapter::AllsourceAuthAdapter;
28pub use error::AllsourceAuthError;