Skip to content

FastAuth v0.7.0

Choose a tag to compare

@github-actions github-actions released this 11 Aug 15:11
· 18 commits to main since this release

Added

  • New documentation site at fastauth.pythowner.com,
    built with Next.js and MDX and deployed on Vercel. Includes full-text search,
    flow diagrams for the token and password reset cycles, a concepts guide that
    explains hashing, JWTs, cookies and RBAC from scratch, a symptom-first
    troubleshooting page, and a reading mode.
  • llms.txt so AI coding agents integrate FastAuth correctly rather than
    guessing at the API.
  • A documented versioning and deprecation policy, in the README and the docs.

Changed

  • One obvious way to do each thing. Four long-form names are superseded by
    shorter equivalents. The old names still work and now emit a
    DeprecationWarning; they will be removed in 1.0.

    Deprecated Replacement
    auth.get_current_active_user_dependency() auth.current_user
    auth.is_admin() auth.admin
    auth.require_roles([...]) auth.roles(...)
    auth.require_all_roles([...]) auth.all_roles(...)

    The replacements accept role names directly or as a list, so both
    auth.roles("admin", "moderator") and auth.roles(["admin", "moderator"])
    work. The deprecated forms now accept either shape too, rather than requiring
    a list.

  • session_getter is documented. Leave it out and FastAuth opens sessions
    on the engine you gave it, which is what most apps want. Pass your own only
    when routes must share a session with the rest of your app.

Fixed

  • token_url now defaults to /token. It previously defaulted to token
    with no leading slash, while the router registers /token. That value is
    what Swagger's Authorize button posts to, and a relative URL resolves
    against the docs path, breaking as soon as the app is mounted under a prefix.
    A missing leading slash is now added automatically, so passing "token" is
    corrected rather than broken.

Removed

  • The previous hand-written static documentation site (index.html,
    easy-mode.html, style.css, scripts.js), replaced by the new site.

Upgrading

No action needed. Deprecated names keep working until 1.0. To find them in your
code, make deprecation warnings fail your tests:

[tool.pytest.ini_options]
filterwarnings = ["error::DeprecationWarning"]

Full Changelog: v0.6.0...v0.7.0