pub struct AuthBuilder { /* private fields */ }Expand description
Initial builder for configuring BetterAuth.
Call .database(adapter) to obtain a TypedAuthBuilder that can
accept plugins and hooks.
Implementations§
Source§impl AuthBuilder
impl AuthBuilder
pub fn new(config: AuthConfig) -> Self
Sourcepub fn database<DB: DatabaseAdapter>(self, database: DB) -> TypedAuthBuilder<DB>
pub fn database<DB: DatabaseAdapter>(self, database: DB) -> TypedAuthBuilder<DB>
Set the database adapter, returning a TypedAuthBuilder.
Sourcepub fn csrf(self, config: CsrfConfig) -> Self
pub fn csrf(self, config: CsrfConfig) -> Self
Configure CSRF protection.
Sourcepub fn rate_limit(self, config: RateLimitConfig) -> Self
pub fn rate_limit(self, config: RateLimitConfig) -> Self
Configure rate limiting.
Sourcepub fn cors(self, config: CorsConfig) -> Self
pub fn cors(self, config: CorsConfig) -> Self
Configure CORS.
Sourcepub fn body_limit(self, config: BodyLimitConfig) -> Self
pub fn body_limit(self, config: BodyLimitConfig) -> Self
Configure body size limit.
Sourcepub fn email_provider<E: EmailProvider + 'static>(self, provider: E) -> Self
pub fn email_provider<E: EmailProvider + 'static>(self, provider: E) -> Self
Set the email provider.
Auto Trait Implementations§
impl Freeze for AuthBuilder
impl !RefUnwindSafe for AuthBuilder
impl Send for AuthBuilder
impl Sync for AuthBuilder
impl Unpin for AuthBuilder
impl UnsafeUnpin for AuthBuilder
impl !UnwindSafe for AuthBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more