# newAuthBuilder

## Summary
Start the top-level auth builder flow by wrapping an `AuthConfig` in an `AuthBuilder`.

## Symbol
- Name: `new`
- Original Symbol: `AuthBuilder::new`
- Kind: `method`
- Owner: `AuthBuilder`

## Signature
```rust
pub fn new(config: AuthConfig) -> Self
```

## Location
- `src/core/auth.rs`
- Re-exported from `src/lib.rs`

## Inputs
- `config`: required; consumed by value

## Returns
- `AuthBuilder`
- The returned builder has no database, no plugins, no hooks, and no configured middleware instances yet

## Errors
- This method does not return an error
- Invalid config values are not rejected here; `TypedAuthBuilder::build()` performs validation later

## Preconditions
- None

## Side Effects
- None

## Guarantees
- The builder starts with `csrf_config`, `rate_limit_config`, `cors_config`, and `body_limit_config` unset
- `custom_middlewares` starts empty
- Callers must call `.database(...)` next to reach the typed builder surface that exposes `.plugin(...)`, `.hook(...)`, and `.build()`
- `AthenaAuth::new(config)` is a convenience alias that delegates to this builder entry point

## Examples
```rust
let auth = AuthBuilder::new(config)
    .database(MemoryDatabaseAdapter::new())
    .plugin(EmailPasswordPlugin::new().enable_signup(true))
    .build()
    .await?;
```

## Source of Truth
- Implementation: `src/core/auth.rs`
- Alias entry point: `src/core/auth.rs`
- Examples: `src/lib.rs`, `examples/auth_builder_minimal.rs`
- Call sites: `tests/compatibility_tests.rs`, `src/tests/response_shape_tests.rs`
