# pluginTypedAuthBuilder

## Summary
Register one plugin on the typed builder so it can participate in initialization and request dispatch.

## Symbol
- Name: `plugin`
- Original Symbol: `TypedAuthBuilder::plugin`
- Kind: `method`
- Owner: `TypedAuthBuilder`

## Signature
```rust
pub fn plugin<P: AuthPlugin<DB> + 'static>(mut self, plugin: P) -> Self
```

## Location
- `src/core/auth.rs`
- Plugins are re-exported from `src/lib.rs`

## Inputs
- `self`: required; consumes and returns the builder for chaining
- `plugin`: required; any plugin implementing `AuthPlugin<DB> + 'static`

## Returns
- `TypedAuthBuilder<DB>`
- The returned builder contains the newly registered plugin appended to its internal plugin list

## Errors
- This method does not return an error
- Plugin initialization failures are deferred until `.build().await`

## Preconditions
- The plugin type must be compatible with the selected database adapter type `DB`

## Side Effects
- None at registration time

## Guarantees
- Registration order is preserved
- `TypedAuthBuilder::build()` will call each plugin's `on_init` in registration order
- `AthenaAuth::handle_request()` later evaluates plugin hooks and plugin route handlers in the stored order and stops at the first plugin that handles the request

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

## Source of Truth
- Implementation: `src/core/auth.rs`
- Plugin dispatch path: `src/core/auth.rs`
- Examples: `examples/auth_builder_minimal.rs`
- Call sites: `tests/compatibility_tests.rs`, `src/tests/response_shape_tests.rs`
