Home

    ---
    title: apogee-auth-runtime
    description: FastAPI/Starlette middleware that wires `apogee-auth` into a running app.
    ---

    # apogee-auth-runtime

    > FastAPI/Starlette middleware that wires `apogee-auth` into a running app.

    ## What is in this package

    | Middleware | What you get |

| --- | --- | | AuthMiddleware | Reads bearer/session token, resolves the user, populates request.state.user | | RbacGuard | Decorator/dependency to require a role or permission | | MfaChallenge | Helper to issue and verify TOTP/WebAuthn challenges |

    ## Install

    ```bash
    pip install apogee-auth-runtime
    ```

    ## Where it fits

    This package is part of the [Apogee Framework](/framework/) ecosystem. It can be used:

    - **Standalone** — install and use directly via `pip` (or `npm` for `@apogee/ai-ui-react`).
    - **As a plugin** — generated projects detect it and register matching CLI subcommands automatically.

    See the [framework's modules overview](/framework/modules/overview/) for how all 28 packages fit together.

    ## Read next

    - [Installation](getting-started/installation.md)
    - [Quickstart](getting-started/quickstart.md)
    - [Reference](reference/index.md)