Skip to content

theAuth 0.7.1

Choose a tag to compare

@github-actions github-actions released this 10 Oct 19:15
14701dd

theAuth 0.7.1

Fixes

  • Resolve the client IP through the trusted proxy helper.
  • Scope management routes to the signed in owner when the default guard is used. With the default session resolver, /agents, /delegations, /audit, /dashboard and POST /authorize only act on the caller's own agents, delegations and audit rows, and POST /agents requires ownerId to be the caller. A custom authenticate resolver behaves as before. Core adds guard.resolve() and the AdapterScope helper so the other adapters can adopt the same checks, and audit.export() accepts a userId filter.
  • Upgrade notes for this release. With the default session guard, a signed in user is limited to their own agents, delegations and audit rows, so an app that used the default guard as a shared admin view must pass an authenticate resolver that checks admin rights. The adapters and the gateway no longer read X-Forwarded-For or X-Real-IP themselves: pass trustedProxy: { trustedProxyCount } or trustedProxy: { trustedHeader } to match your proxy, otherwise an ipAllowlist constraint denies because the client IP is unknown. The captcha helper no longer trusts CF-Connecting-IP unconditionally, use trustedProxy: { trustedHeader: "cf-connecting-ip" } to keep it. Adapters require @glinr/theauth 0.7.1 or newer.
  • Resolve the client IP through the trusted proxy helper. The hono and express adapters no longer read X-Forwarded-For or X-Real-IP directly. By default forwarded headers are ignored (Express still falls back to req.ip), so an ipAllowlist constraint denies when the IP is unknown. Pass trustedProxy: { trustedProxyCount } or trustedProxy: { trustedHeader } to the adapter to match your proxy setup.

Packages in this release

Package Version Changelog
@glinr/theauth 0.7.0 to 0.7.1 CHANGELOG
@glinr/theauth-astro 5.0.0 to 5.0.1 CHANGELOG
@glinr/theauth-cli 0.3.0 to 0.3.2 CHANGELOG
@glinr/theauth-express 5.0.0 to 5.0.1 CHANGELOG
@glinr/theauth-fastify 5.0.0 to 5.0.1 CHANGELOG
@glinr/theauth-gateway 4.0.0 to 4.0.2 CHANGELOG
@glinr/theauth-hono 5.0.0 to 5.0.1 CHANGELOG
@glinr/theauth-mcp 0.2.0 (new) CHANGELOG
@glinr/theauth-nestjs 5.0.0 to 5.0.1 CHANGELOG
@glinr/theauth-nextjs 5.0.0 to 5.0.1 CHANGELOG
@glinr/theauth-nuxt 5.0.0 to 5.0.1 CHANGELOG
@glinr/theauth-solidstart 5.0.0 to 5.0.1 CHANGELOG
@glinr/theauth-sveltekit 5.0.0 to 5.0.1 CHANGELOG
@glinr/theauth-tanstack 5.0.0 to 5.0.1 CHANGELOG
theauth 0.2.1 (new) CHANGELOG

Install

npm install @glinr/theauth@0.7.1

Go: go get github.com/glincker/theauth-go/v2 (releases: https://github.com/glincker/theauth-go/releases). Docs: https://docs.theauth.dev

Full changelog: v0.7.0...v0.7.1

Discussion: https://github.com/glincker/theauth/discussions/172