authx 1.5.1
Ready to use and customizable Authentications and Oauth2 management for FastAPI
Requires Python: >=3.9
Keywords: Authentication, Cookie, FastAPI, JWT, Oauth2, Pydantic

# AuthX

<p align="center">
<a href="https://authx.yezz.me" target="_blank">
    <img src="https://user-images.githubusercontent.com/52716203/136962014-280d82b0-0640-4ee5-9a11-b451b338f6d8.png" alt="AuthX">
</a>
<p align="center">
    <em>Ready-to-use and customizable Authentications and Oauth2 management for FastAPI ⚡</em>
</p>
</p>

---

| Project | Status |
|---------|--------|
| CI      | [![CI](https://github.com/yezz123/authx/actions/workflows/ci.yml/badge.svg)](https://github.com/yezz123/authx/actions/workflows/ci.yml) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/yezz123/authx/main.svg)](https://results.pre-commit.ci/latest/github/yezz123/authx/main) [![Codecov](https://codecov.io/gh/yezz123/authx/branch/main/graph/badge.svg)](https://codecov.io/gh/yezz123/authx) |
| Meta    | [![Package version](https://img.shields.io/pypi/v/authx?color=%2334D058&label=pypi%20package)](https://pypi.org/project/authx) [![Downloads](https://static.pepy.tech/badge/authx)](https://pepy.tech/project/authx) [![Pydantic Version 2](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/pydantic/pydantic/main/docs/badge/v2.json)](https://pydantic.dev) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=yezz123_authx&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=yezz123_authx) |

---

**Source Code**: <https://github.com/yezz123/authx>

**Documentation**: <https://authx.yezz.me/>

---

Add a fully featured authentication and authorization system to your [FastAPI](https://fastapi.tiangolo.com/) project. **AuthX** is designed to be simple, customizable, and secure.

## Installation

```bash
pip install authx
```

## Quick Start

```python
from fastapi import FastAPI, Depends, HTTPException
from authx import AuthX, AuthXConfig

app = FastAPI()

config = AuthXConfig(
    JWT_SECRET_KEY="your-secret-key",  # Change this!
    JWT_TOKEN_LOCATION=["headers"],
)

auth = AuthX(config=config)
auth.handle_errors(app)

[@app](https://github.com/app).post("/login")
def login(username: str, password: str):
    if username == "test" and password == "test":
        token = auth.create_access_token(uid=username)
        return {"access_token": token}
    raise HTTPException(401, detail="Invalid credentials")

[@app](https://github.com/app).get("/protected", dependencies=[Depends(auth.access_token_required)])
def protected():
    return {"message": "Hello World"}
```

**Test it:**

```bash
# Get a token
curl -X POST "http://localhost:8000/login?username=test&password=test"

# Access protected route
curl -H "Authorization: Bearer <your-token>" http://localhost:8000/protected
```

## Features

- Support for Python 3.9+ and Pydantic 2
- JWT authentication with multiple token locations:
  - Headers (Bearer token)
  - Cookies (with CSRF protection)
  - Query parameters
  - JSON body
- Access and refresh token support
- Token freshness for sensitive operations
- Token blocklist/revocation
- Extensible error handling

### Extra Features

Install [`authx-extra`](https://github.com/yezz123/authx-extra) for additional features:

```bash
pip install authx-extra
```

- Redis session store and cache
- HTTP caching
- Performance profiling with pyinstrument
- Prometheus metrics

**Note:** Check [Release Notes](https://authx.yezz.me/release/).

## Contributors and Sponsors

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-17-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

Thanks goes to these wonderful people
([emoji key](https://allcontributors.org/docs/en/emoji-key)):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
  <tbody>
    <tr>
      <td align="center" valign="top" width="14.28%"><a href="http://yezz.me"><img src="https://avatars.githubusercontent.com/u/52716203?v=4?s=100" width="100px;" alt="Yasser Tahiri"/><br /><sub><b>Yasser Tahiri</b></sub></a><br /><a href="https://github.com/yezz123/authx/commits?author=yezz123" title="Code">💻</a> <a href="https://github.com/yezz123/authx/commits?author=yezz123" title="Documentation">📖</a> <a href="#maintenance-yezz123" title="Maintenance">🚧</a> <a href="#infra-yezz123" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://soubai.me"><img src="https://avatars.githubusercontent.com/u/11523791?v=4?s=100" width="100px;" alt="Abderrahim SOUBAI-ELIDRISI"/><br /><sub><b>Abderrahim SOUBAI-ELIDRISI</b></sub></a><br /><a href="https://github.com/yezz123/authx/pulls?q=is%3Apr+reviewed-by%3AAbderrahimSoubaiElidrissi" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/yezz123/authx/commits?author=AbderrahimSoubaiElidrissi" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://smakosh.com"><img src="https://avatars.githubusercontent.com/u/20082141?v=4?s=100" width="100px;" alt="Ismail Ghallou "/><br /><sub><b>Ismail Ghallou </b></sub></a><br /><a href="https://github.com/yezz123/authx/commits?author=smakosh" title="Code">💻</a> <a href="#security-smakosh" title="Security">🛡️</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/MojixCoder"><img src="https://avatars.githubusercontent.com/u/76670309?v=4?s=100" width="100px;" alt="MojixCoder"/><br /><sub><b>MojixCoder</b></sub></a><br /><a href="https://github.com/yezz123/authx/commits?author=MojixCoder" title="Code">💻</a> <a href="https://github.com/yezz123/authx/issues?q=author%3AMojixCoder" title="Bug reports">🐛</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://sralab.com"><img src="https://avatars.githubusercontent.com/u/1815?v=4?s=100" width="100px;" alt="Stéphane Raimbault"/><br /><sub><b>Stéphane Raimbault</b></sub></a><br /><a href="https://github.com/yezz123/authx/commits?author=stephane" title="Code">💻</a> <a href="#plugin-stephane" title="Plugin/utility libraries">🔌</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/theoohoho"><img src="https://avatars.githubusercontent.com/u/31537466?v=4?s=100" width="100px;" alt="theoohoho"/><br /><sub><b>theoohoho</b></sub></a><br /><a href="https://github.com/yezz123/authx/commits?author=theoohoho" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://yogeshupadhyay.netlify.app/"><img src="https://avatars.githubusercontent.com/u/53992168?v=4?s=100" width="100px;" alt="Yogesh Upadhyay"/><br /><sub><b>Yogesh Upadhyay</b></sub></a><br /><a href="https://github.com/yezz123/authx/issues?q=author%3AYogeshUpdhyay" title="Bug reports">🐛</a></td>
    </tr>
    <tr>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/iftenet"><img src="https://avatars.githubusercontent.com/u/1397880?v=4?s=100" width="100px;" alt="Roman"/><br /><sub><b>Roman</b></sub></a><br /><a href="https://github.com/yezz123/authx/issues?q=author%3Aiftenet" title="Bug reports">🐛</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/today/author/alobbs"><img src="https://avatars.githubusercontent.com/u/170559?v=4?s=100" width="100px;" alt="Alvaro Lopez Ortega"/><br /><sub><b>Alvaro Lopez Ortega</b></sub></a><br /><a href="https://github.com/yezz123/authx/commits?author=alobbs" title="Documentation">📖</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/pinchXOXO"><img src="https://avatars.githubusercontent.com/u/68501799?v=4?s=100" width="100px;" alt="Devy Santo"/><br /><sub><b>Devy Santo</b></sub></a><br /><a href="#infra-pinchXOXO" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/pg365"><img src="https://avatars.githubusercontent.com/u/173273017?v=4?s=100" width="100px;" alt="pg365"/><br /><sub><b>pg365</b></sub></a><br /><a href="#infra-pg365" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/jor-rit"><img src="https://avatars.githubusercontent.com/u/16398756?v=4?s=100" width="100px;" alt="Jorrit"/><br /><sub><b>Jorrit</b></sub></a><br /><a href="#platform-jor-rit" title="Packaging/porting to new platform">📦</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/callamd"><img src="https://avatars.githubusercontent.com/u/1664656?v=4?s=100" width="100px;" alt="Callam"/><br /><sub><b>Callam</b></sub></a><br /><a href="https://github.com/yezz123/authx/commits?author=callamd" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/lmasikl"><img src="https://avatars.githubusercontent.com/u/1556136?v=4?s=100" width="100px;" alt="Maxim"/><br /><sub><b>Maxim</b></sub></a><br /><a href="https://github.com/yezz123/authx/commits?author=lmasikl" title="Code">💻</a></td>
    </tr>
    <tr>
      <td align="center" valign="top" width="14.28%"><a href="https://evergreenies.github.io"><img src="https://avatars.githubusercontent.com/u/33820365?v=4?s=100" width="100px;" alt="Suyog Shimpi"/><br /><sub><b>Suyog Shimpi</b></sub></a><br /><a href="https://github.com/yezz123/authx/commits?author=Evergreenies" title="Code">💻</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/NeViNez"><img src="https://avatars.githubusercontent.com/u/91369880?v=4?s=100" width="100px;" alt="NeViNez"/><br /><sub><b>NeViNez</b></sub></a><br /><a href="https://github.com/yezz123/authx/issues?q=author%3ANeViNez" title="Bug reports">🐛</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/Antareske"><img src="https://avatars.githubusercontent.com/u/171327898?v=4?s=100" width="100px;" alt="Antareske"/><br /><sub><b>Antareske</b></sub></a><br /><a href="https://github.com/yezz123/authx/commits?author=Antareske" title="Code">💻</a></td>
    </tr>
  </tbody>
</table>

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the
[all-contributors](https://github.com/all-contributors/all-contributors)
specification. Contributions of any kind welcome!

## License

This project is licensed under the terms of the MIT License.

## Changelog

## Latest Changes

## 1.5.1

* :sparkles: feat: support Async/sync Callbacks. PR [#793](https://github.com/yezz123/authx/pull/793) by [@Antareske](https://github.com/Antareske).

### Upgrades

* ⬆ Bump the python-packages group with 9 updates. PR [#807](https://github.com/yezz123/authx/pull/807) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump cryptography from 44.0.2 to 46.0.5 in /examples. PR [#806](https://github.com/yezz123/authx/pull/806) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump cryptography from 44.0.1 to 46.0.5. PR [#805](https://github.com/yezz123/authx/pull/805) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump python-jose from 3.3.0 to 3.4.0. PR [#801](https://github.com/yezz123/authx/pull/801) by [@dependabot[bot]](https://github.com/apps/dependabot).
* Bump starlette from 0.46.0 to 0.49.1 in /examples. PR [#803](https://github.com/yezz123/authx/pull/803) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump cryptography from 44.0.0 to 44.0.1. PR [#804](https://github.com/yezz123/authx/pull/804) by [@dependabot[bot]](https://github.com/apps/dependabot).
* Bump h11 from 0.14.0 to 0.16.0 in /examples. PR [#802](https://github.com/yezz123/authx/pull/802) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump urllib3 from 1.26.15 to 2.6.3. PR [#800](https://github.com/yezz123/authx/pull/800) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump starlette from 0.41.3 to 0.49.1. PR [#799](https://github.com/yezz123/authx/pull/799) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump pyasn1 from 0.6.1 to 0.6.2. PR [#798](https://github.com/yezz123/authx/pull/798) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump virtualenv from 20.33.1 to 20.36.1. PR [#797](https://github.com/yezz123/authx/pull/797) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆️ Bump `ruff-pre-commit` from v0.14.14 to v0.15.0. PR [#795](https://github.com/yezz123/authx/pull/795) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️ Bump `ruff-pre-commit` from v0.14.13 to v0.14.14. PR [#791](https://github.com/yezz123/authx/pull/791) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️ Bump `ruff-pre-commit` from v0.14.11 to v0.14.12. PR [#790](https://github.com/yezz123/authx/pull/790) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️ Bump `ruff-pre-commit` from v0.14.10 to v0.14.11. PR [#789](https://github.com/yezz123/authx/pull/789) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).

### Docs

* :memo: docs: add [@Antareske](https://github.com/Antareske) as a contributor for code. PR [#794](https://github.com/yezz123/authx/pull/794) by [@allcontributors[bot]](https://github.com/apps/allcontributors).

### Internal

* :bug: improve type annotations to fix mypy issues. PR [#796](https://github.com/yezz123/authx/pull/796) by [@yezz123](https://github.com/yezz123).

## 1.5.0

### Breaking Changes

* ✨ Implement scope management features. PR [#788](https://github.com/yezz123/authx/pull/788) by [@yezz123](https://github.com/yezz123).

### Features

* :recycle: Update CI workflow and add support for Python 3.14. PR [#782](https://github.com/yezz123/authx/pull/782) by [@yezz123](https://github.com/yezz123).
* :sparkles: Drop pydantic v1 & support only pydantic v2. PR [#781](https://github.com/yezz123/authx/pull/781) by [@yezz123](https://github.com/yezz123).

### Fixes

* :bug: Improve CSRF error handling and messaging. PR [#783](https://github.com/yezz123/authx/pull/783) by [@yezz123](https://github.com/yezz123).
* 🔧 Refactor token retrieval methods in AuthX class. PR [#780](https://github.com/yezz123/authx/pull/780) by [@yezz123](https://github.com/yezz123).
* 🐛 Enhance CSRF token error handling and simplify token location. PR [#779](https://github.com/yezz123/authx/pull/779) by [@yezz123](https://github.com/yezz123).
* 🐛  use refresh parameter in `_get_token_from_headers()`. PR [#776](https://github.com/yezz123/authx/pull/776) by [@NeViNez](https://github.com/NeViNez).

### Upgrades

* ⬆️ Bump ruff-pre-commit from v0.14.6 to v0.14.10. PR [#777](https://github.com/yezz123/authx/pull/777) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️ Bump `ruff-pre-commit` from v0.14.1 to v0.14.6. PR [#773](https://github.com/yezz123/authx/pull/773) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆ Bump actions/checkout from 5 to 6. PR [#774](https://github.com/yezz123/authx/pull/774) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆️ Bump `ruff-pre-commit` from v0.12.11 to v0.14.1. PR [#770](https://github.com/yezz123/authx/pull/770) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆ Bump astral-sh/setup-uv from 6 to 7. PR [#772](https://github.com/yezz123/authx/pull/772) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump actions/setup-python from 5 to 6. PR [#769](https://github.com/yezz123/authx/pull/769) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆️ Bump `ruff-pre-commit` from v0.12.10 to v0.12.11. PR [#768](https://github.com/yezz123/authx/pull/768) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️ Bump `ruff-pre-commit` from v0.12.9 to v0.12.10. PR [#767](https://github.com/yezz123/authx/pull/767) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️ Bump `ruff-pre-commit` from v0.12.3 to v0.12.9. PR [#764](https://github.com/yezz123/authx/pull/764) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆ Bump actions/checkout from 4 to 5. PR [#766](https://github.com/yezz123/authx/pull/766) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump samuelcolvin/check-python-version from 4.1 to 5. PR [#765](https://github.com/yezz123/authx/pull/765) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆️ Bump `ruff-pre-commit` from v0.12.2 to v0.12.3. PR [#762](https://github.com/yezz123/authx/pull/762) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️ Bump `ruff-pre-commit` from v0.12.1 to v0.12.2. PR [#761](https://github.com/yezz123/authx/pull/761) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️ Bump `ruff-pre-commit` from v0.11.13 to v0.12.1. PR [#760](https://github.com/yezz123/authx/pull/760) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️ Bump `ruff-pre-commit` from v0.11.12 to v0.11.13. PR [#759](https://github.com/yezz123/authx/pull/759) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️ Bump `ruff-pre-commit` from v0.11.11 to v0.11.12. PR [#757](https://github.com/yezz123/authx/pull/757) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).

### Docs

* 📝 Update README for AuthX. PR [#785](https://github.com/yezz123/authx/pull/785) by [@yezz123](https://github.com/yezz123).
* 📝 Update documentation for AuthX features and usage. PR [#784](https://github.com/yezz123/authx/pull/784) by [@yezz123](https://github.com/yezz123).
* 📝  add [@NeViNez](https://github.com/NeViNez) as a contributor for bug. PR [#778](https://github.com/yezz123/authx/pull/778) by [@allcontributors[bot]](https://github.com/apps/allcontributors).

### Internal

* ✨ Add Jinja2 template engine support documentation and examples. PR [#787](https://github.com/yezz123/authx/pull/787) by [@yezz123](https://github.com/yezz123).
* :sparkles: Add dual token location pattern documentation and example. PR [#786](https://github.com/yezz123/authx/pull/786) by [@yezz123](https://github.com/yezz123).

## 1.4.3

### Features

* ✨ added support for `JWT_COOKIE_HTTP_ONLY`. PR [#755](https://github.com/yezz123/authx/pull/755) by [@Evergreenies](https://github.com/Evergreenies).

### Fixes

* 🐛  Fix Examples bugs. PR [#753](https://github.com/yezz123/authx/pull/753) by [@Evergreenies](https://github.com/Evergreenies).

### Upgrades

* ⬆️ Bump `ruff-pre-commit` from v0.11.9 to v0.11.11. PR [#751](https://github.com/yezz123/authx/pull/751) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️ Bump `ruff-pre-commit` from v0.11.6 to v0.11.9. PR [#750](https://github.com/yezz123/authx/pull/750) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆ Bump astral-sh/setup-uv from 5 to 6. PR [#749](https://github.com/yezz123/authx/pull/749) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆️ Bump `ruff-pre-commit` from v0.11.5 to v0.11.6. PR [#748](https://github.com/yezz123/authx/pull/748) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️ Bump `ruff-pre-commit` from v0.11.2 to v0.11.5. PR [#747](https://github.com/yezz123/authx/pull/747) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).

### Docs

* 📝 add [@Evergreenies](https://github.com/Evergreenies) as a contributor for code. PR [#754](https://github.com/yezz123/authx/pull/754) by [@allcontributors[bot]](https://github.com/apps/allcontributors).

### Internal

* :recycle: change the Package ecosystem to `uv`. PR [#744](https://github.com/yezz123/authx/pull/744) by [@yezz123](https://github.com/yezz123).

## 1.4.2

### Features

* ♻️ Deprecate data keyword argument in `decode_token`. PR [#741](https://github.com/yezz123/authx/pull/741) by [@lmasikl](https://github.com/lmasikl).

### Upgrades

* ⬆️ Bump `ruff-pre-commit` from v0.9.10 to v0.11.2. PR [#743](https://github.com/yezz123/authx/pull/743) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️ Bump `ruff-pre-commit` from v0.9.9 to v0.9.10. PR [#740](https://github.com/yezz123/authx/pull/740) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️ Bump `ruff-pre-commit` from v0.9.7 to v0.9.9. PR [#739](https://github.com/yezz123/authx/pull/739) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️ Bump `ruff-pre-commit` from v0.9.6 to v0.9.7. PR [#735](https://github.com/yezz123/authx/pull/735) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️ Bump `ruff-pre-commit` from v0.9.4 to v0.9.6. PR [#733](https://github.com/yezz123/authx/pull/733) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️ [pre-commit.ci] pre-commit autoupdate. PR [#732](https://github.com/yezz123/authx/pull/732) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️ Update pytz requirement in the python-packages group. PR [#731](https://github.com/yezz123/authx/pull/731) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆️ [pre-commit.ci] pre-commit autoupdate. PR [#730](https://github.com/yezz123/authx/pull/730) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️ Bump `ruff-pre-commit` from v0.9.1 to v0.9.2. PR [#729](https://github.com/yezz123/authx/pull/729) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️ Bump `ruff-pre-commit` from v0.8.6 to v0.9.1. PR [#728](https://github.com/yezz123/authx/pull/728) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️ Bump `ruff-pre-commit` from v0.8.4 to v0.8.6 . PR [#727](https://github.com/yezz123/authx/pull/727) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️ Bump astral-sh/setup-uv from 4 to 5. PR [#724](https://github.com/yezz123/authx/pull/724) by [@dependabot[bot]](https://github.com/apps/dependabot).

### Docs

* 📝 add [@lmasikl](https://github.com/lmasikl) as a contributor for code. PR [#742](https://github.com/yezz123/authx/pull/742) by [@allcontributors[bot]](https://github.com/apps/allcontributors).
* 📝 Update documentation for AuthX. PR [#737](https://github.com/yezz123/authx/pull/737) by [@yezz123](https://github.com/yezz123).

### Internal

* ✨ Add examples for AuthX authentication. PR [#738](https://github.com/yezz123/authx/pull/738) by [@yezz123](https://github.com/yezz123).
* 🏗️ Update CI workflow to use only Ubuntu. PR [#736](https://github.com/yezz123/authx/pull/736) by [@yezz123](https://github.com/yezz123).
* 🔧  Remove requirements from the build target. PR [#726](https://github.com/yezz123/authx/pull/726) by [@yezz123](https://github.com/yezz123).
* 🔧 Update release workflow to use `astral-sh/setup-uv`. PR [#723](https://github.com/yezz123/authx/pull/723) by [@yezz123](https://github.com/yezz123).

## 1.4.1

### Features

* ✨ Support async sessions. PR [#709](https://github.com/yezz123/authx/pull/709) by [@callamd](https://github.com/callamd).

### Internal

* 🗑️ Deprecate MemoryIO class and associated tests. PR [#721](https://github.com/yezz123/authx/pull/721) by [@yezz123](https://github.com/yezz123).
* 🔧  Enhance the Project Dependencies to be fully migrated to UV. PR [#711](https://github.com/yezz123/authx/pull/711) by [@yezz123](https://github.com/yezz123).

### Docs

* 📝 Update installation instructions to simplify pip install command. PR [#722](https://github.com/yezz123/authx/pull/722) by [@yezz123](https://github.com/yezz123).
* 📝 Update documentation for installation and command usage. PR [#718](https://github.com/yezz123/authx/pull/718) by [@yezz123](https://github.com/yezz123).
* 📝 add [@callamd](https://github.com/callamd) as a contributor for code. PR [#710](https://github.com/yezz123/authx/pull/710) by [@allcontributors[bot]](https://github.com/apps/allcontributors).

### Upgrades

* ⬆️️ Bump `ruff-pre-commit` from v0.8.1 to v0.8.4. PR [#719](https://github.com/yezz123/authx/pull/719) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️️ Bump ruff-pre-commit from v0.8.0 to v0.8.1. PR [#707](https://github.com/yezz123/authx/pull/707) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️ Bump the python-packages group with 17 updates. PR [#706](https://github.com/yezz123/authx/pull/706) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆️️ Bump `ruff-pre-commit` from v0.7.4 to v0.8.0. PR [#705](https://github.com/yezz123/authx/pull/705) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️️ Bump `ruff-pre-commit` from v0.7.3 to v0.7.4. PR [#703](https://github.com/yezz123/authx/pull/703) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️ Bump codecov/codecov-action from 4 to 5. PR [#701](https://github.com/yezz123/authx/pull/701) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆️️ Bump `ruff-pre-commit` from v0.7.2 to v0.7.3. PR [#699](https://github.com/yezz123/authx/pull/699) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️ Bump pypa/gh-action-pypi-publish from 1.11.0 to 1.12.2. PR [#697](https://github.com/yezz123/authx/pull/697) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆️️ Upgrade the uv setup package to 4.1. PR [#700](https://github.com/yezz123/authx/pull/700) by [@yezz123](https://github.com/yezz123).
* ⬆️️ Bump `ruff-pre-commit` from v0.7.1 to v0.7.2. PR [#696](https://github.com/yezz123/authx/pull/696) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️ Bump the python-packages group with 8 updates. PR [#694](https://github.com/yezz123/authx/pull/694) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆️ Bump pypa/gh-action-pypi-publish from 1.10.3 to 1.11.0. PR [#695](https://github.com/yezz123/authx/pull/695) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆️️ Bump `ruff-pre-commit` from v0.7.0 to v0.7.1. PR [#693](https://github.com/yezz123/authx/pull/693) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️ Bump the python-packages group with 7 updates. PR [#692](https://github.com/yezz123/authx/pull/692) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆️️ Bump `ruff-pre-commit` from v0.6.9 to v0.7.0. PR [#690](https://github.com/yezz123/authx/pull/690) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️ Bump the python-packages group with 12 updates. PR [#689](https://github.com/yezz123/authx/pull/689) by [@dependabot[bot]](https://github.com/apps/dependabot).

## 1.4.0

__Note:__ This release contains breaking changes, Dropping support for Python 3.8, and adding support for Python 3.13.

### Breaking Changes

* 🔧 Add support for Python 3.13. PR [#687](https://github.com/yezz123/authx/pull/687) by [@yezz123](https://github.com/yezz123).

### Fixes

* 🐛 fix Missing `Audience` & `Issuer` in the verify token. PR [#686](https://github.com/yezz123/authx/pull/686) by [@yezz123](https://github.com/yezz123).

### Upgrades

* ⬆️️ Bump starlette from 0.39.2 to 0.40.0. PR [#688](https://github.com/yezz123/authx/pull/688) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆️️ Bump the python-packages group with 16 updates. PR [#685](https://github.com/yezz123/authx/pull/685) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆️️ Bump the Pre-commit Dependencies Version. PR [#684](https://github.com/yezz123/authx/pull/684) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️️ Bump pypa/gh-action-pypi-publish from 1.10.2 to 1.10.3. PR [#681](https://github.com/yezz123/authx/pull/681) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆️️️ Update dependencies in `uv.lock`. PR [#680](https://github.com/yezz123/authx/pull/680) by [@yezz123](https://github.com/yezz123).
* ⬆️️ Bump `ruff-pre-commit` from v0.6.7 to v0.6.8. PR [#678](https://github.com/yezz123/authx/pull/678) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).

### Docs

* 📝 Fix Pydantic Version in the documentation. PR [#679](https://github.com/yezz123/authx/pull/679) by [@yezz123](https://github.com/yezz123).

### Internal

* ♻️ Refactor pyproject to add dev dependencies in uv tool. PR [#676](https://github.com/yezz123/authx/pull/676) by [@yezz123](https://github.com/yezz123).

## 1.3.1

### Upgrades

* ⬆️️️ Bump `ruff-pre-commit` from v0.6.5 to v0.6.7. PR [#673](https://github.com/yezz123/authx/pull/673) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️️️ Bump pypa/gh-action-pypi-publish from 1.10.1 to 1.10.2. PR [#672](https://github.com/yezz123/authx/pull/672) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆️️️ Bump ruff-pre-commit from v0.6.4 to v0.6.5. PR [#671](https://github.com/yezz123/authx/pull/671) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️️️ Bump ruff-pre-commit from v0.6.3 to v0.6.4. PR [#670](https://github.com/yezz123/authx/pull/670) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️️️ Bump pypa/gh-action-pypi-publish from 1.10.0 to 1.10.1. PR [#669](https://github.com/yezz123/authx/pull/669) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆️️️️ Bump cryptography from 43.0.0 to 43.0.1. PR [#668](https://github.com/yezz123/authx/pull/668) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆️️️ Bump ruff-pre-commit from v0.6.2 to v0.6.3. PR [#667](https://github.com/yezz123/authx/pull/667) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️️️ Bump ruff-pre-commit from v0.6.1 to v0.6.2. PR [#662](https://github.com/yezz123/authx/pull/662) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️️️ Bump pypa/gh-action-pypi-publish from 1.9.0 to 1.10.0. PR [#665](https://github.com/yezz123/authx/pull/665) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆️️️ Bump ruff-pre-commit from v0.5.7 to v0.6.1. PR [#659](https://github.com/yezz123/authx/pull/659) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️️️ Bump ruff-pre-commit from v0.5.6 to v0.5.7. PR [#656](https://github.com/yezz123/authx/pull/656) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️️️ Bump ruff-pre-commit from v0.5.5 to v0.5.6. PR [#654](https://github.com/yezz123/authx/pull/654) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️️️ Bump the python-packages group with 5 updates. PR [#652](https://github.com/yezz123/authx/pull/652) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆️️️ Bump ruff-pre-commit from v0.5.4 to v0.5.5. PR [#653](https://github.com/yezz123/authx/pull/653) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️️️️ Update uv version to `0.2.30`. PR [#650](https://github.com/yezz123/authx/pull/650) by [@pinchXOXO](https://github.com/pinchXOXO).
* ⬆️️️ Bump ruff-pre-commit from v0.5.2 to v0.5.4. PR [#648](https://github.com/yezz123/authx/pull/648) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).

### Docs

* ♻️ Refactor documentation requirements. PR [#674](https://github.com/yezz123/authx/pull/674) by [@yezz123](https://github.com/yezz123).
* 📝 add [@jor-rit](https://github.com/jor-rit) as a contributor for platform. PR [#666](https://github.com/yezz123/authx/pull/666) by [@allcontributors[bot]](https://github.com/apps/allcontributors).
* 🍱 Optimize images sizes. PR [#651](https://github.com/yezz123/authx/pull/651) by [@imgbot[bot]](https://github.com/apps/imgbot).
* 📝 Update image URL in different pages & Fix naming typo. PR [#649](https://github.com/yezz123/authx/pull/649) by [@yezz123](https://github.com/yezz123).
* 🔧 Re-organize `mkdocs` configuration & add new plugins. PR [#646](https://github.com/yezz123/authx/pull/646) by [@yezz123](https://github.com/yezz123).

### Internal

* :wrench: Drop Python 3.8 version matrix in CI workflow. PR [#675](https://github.com/yezz123/authx/pull/675) by [@yezz123](https://github.com/yezz123).
* 🐛  add `itsdangerous` to project dependencies level. PR [#664](https://github.com/yezz123/authx/pull/664) by [@jor-rit](https://github.com/jor-rit).

## 1.3.0

### Features

* 🔧 Support both pydantic versions. PR [#638](https://github.com/yezz123/authx/pull/638) by [@yezz123](https://github.com/yezz123).

### Fixes

* 🐛 fix unsupported comparison between two type instances. PR [#643](https://github.com/yezz123/authx/pull/643) by [@yezz123](https://github.com/yezz123).
* 🐛 add support for additional data in JWT token creation and decoding. PR [#641](https://github.com/yezz123/authx/pull/641) by [@yezz123](https://github.com/yezz123).

### Refactors

* ♻️ Refactor `_CallbackHandler` to handle optional model instances. PR [#640](https://github.com/yezz123/authx/pull/640) by [@yezz123](https://github.com/yezz123).

### Upgrades

* ⬆️️️ Bump ruff-pre-commit from v0.5.1 to v0.5.2. PR [#644](https://github.com/yezz123/authx/pull/644) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️️️️ Update uv version to `0.2.24`. PR [#642](https://github.com/yezz123/authx/pull/642) by [@pinchXOXO](https://github.com/pinchXOXO).
* ⬆️️️ Bump `ruff-pre-commit` from v0.5.0 to v0.5.1. PR [#639](https://github.com/yezz123/authx/pull/639) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).

## 1.2.1

### Upgrades

* ⬆️️️️ Bump certifi from `2024.6.2` to `2024.7.4`. PR [#637](https://github.com/yezz123/authx/pull/637) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆️️️️ Update pydantic and pydantic-core versions to 2.8.0 and 2.20.0. PR [#635](https://github.com/yezz123/authx/pull/635) by [@yezz123](https://github.com/yezz123).
* ⬆️️️️ Bump `ruff-pre-commit` from v0.4.10 to v0.5.0. PR [#634](https://github.com/yezz123/authx/pull/634) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️️️️ Bump `uv` version to `0.2.18`. PR [#632](https://github.com/yezz123/authx/pull/632) by [@pg365](https://github.com/pg365).
* ⬆️️️️ Bump `ruff-pre-commit` from v0.4.9 to v0.4.10. PR [#627](https://github.com/yezz123/authx/pull/627) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).

### Docs

* 📝 add [@pg365](https://github.com/pg365) as a contributor for Dependencies. PR [#633](https://github.com/yezz123/authx/pull/633) by [@allcontributors[bot]](https://github.com/apps/allcontributors).

### Internal

* ♻️ Refactor CSRF token retrieval. PR [#636](https://github.com/yezz123/authx/pull/636) by [@yezz123](https://github.com/yezz123).
* 🐛 Add edge cases Tests for error module. PR [#631](https://github.com/yezz123/authx/pull/631) by [@yezz123](https://github.com/yezz123).
* ♻️ Test Edge cases &  Refactor `SignatureSerializer` & `_CallbackHandler` tests. PR [#625](https://github.com/yezz123/authx/pull/625) by [@yezz123](https://github.com/yezz123).
* 🔧 automate Labeling PRs by Dependabot. PR [#628](https://github.com/yezz123/authx/pull/628) by [@yezz123](https://github.com/yezz123).

## 1.2.0

### Features

* 🔧 Update Python versions for `mypy` workflow. PR [#603](https://github.com/yezz123/authx/pull/603) by [@yezz123](https://github.com/yezz123).

### Refactors

* 🔧 Remove `no-untyped-def` from disabled error codes. PR [#621](https://github.com/yezz123/authx/pull/621) by [@yezz123](https://github.com/yezz123).
* 🔧 Remove `arg-type` from disabled error codes. PR [#619](https://github.com/yezz123/authx/pull/619) by [@yezz123](https://github.com/yezz123).
* 🔧 Remove `dict-item` from disabled error codes. PR [#617](https://github.com/yezz123/authx/pull/617) by [@yezz123](https://github.com/yezz123).
* 🔧 Remove `call-arg` from disabled error codes. PR [#616](https://github.com/yezz123/authx/pull/616) by [@yezz123](https://github.com/yezz123).
* 🔧 Remove return-value from disabled error codes. PR [#615](https://github.com/yezz123/authx/pull/615) by [@yezz123](https://github.com/yezz123).
* 🔧 Remove `call-overload` from disabled error codes. PR [#613](https://github.com/yezz123/authx/pull/613) by [@yezz123](https://github.com/yezz123).
* 🔧 Remove `type-arg` from disabled error codes. PR [#612](https://github.com/yezz123/authx/pull/612) by [@yezz123](https://github.com/yezz123).
* 🐛  remove `print()` in the release file. PR [#594](https://github.com/yezz123/authx/pull/594) by [@pinchXOXO](https://github.com/pinchXOXO).

### Upgrades

* ⬆️️️️ Bump urllib3 from 2.2.1 to 2.2.2 in /requirements. PR [#622](https://github.com/yezz123/authx/pull/622) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆️️️️ Bump `ruff-pre-commit` from v0.4.8 to v0.4.9. PR [#623](https://github.com/yezz123/authx/pull/623) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️️️️ Bump pypa/gh-action-pypi-publish from 1.8.14 to 1.9.0. PR [#620](https://github.com/yezz123/authx/pull/620) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆️️️️ Bump `ruff-pre-commit` from v0.4.7 to v0.4.8. PR [#601](https://github.com/yezz123/authx/pull/601) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️️️️ Bump the python-packages group with 2 updates. PR [#600](https://github.com/yezz123/authx/pull/600) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆️️️️ Bump `ruff-pre-commit` from v0.4.5 to v0.4.7. PR [#598](https://github.com/yezz123/authx/pull/598) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️️️️ [pre-commit.ci] pre-commit autoupdate. PR [#597](https://github.com/yezz123/authx/pull/597) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️️️️ Bump the python-packages group with 4 updates. PR [#596](https://github.com/yezz123/authx/pull/596) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ⬆️️️️ Update uv version to `0.2.3`. PR [#595](https://github.com/yezz123/authx/pull/595) by [@pinchXOXO](https://github.com/pinchXOXO).

### Docs

* 📝 Update meta information. PR [#614](https://github.com/yezz123/authx/pull/614) by [@yezz123](https://github.com/yezz123).

### Internal

* 🔨 Integrate `mypy` and enhance `typing` in code. PR [#532](https://github.com/yezz123/authx/pull/532) by [@yezz123](https://github.com/yezz123).
* 🔧 Separate CI of testing from Release one . PR [#593](https://github.com/yezz123/authx/pull/593) by [@yezz123](https://github.com/yezz123).

## 1.1.3

### Features

* ♻️ Replaces use of default mutable arguments. PR [#589](https://github.com/yezz123/authx/pull/589) by [@yezz123](https://github.com/yezz123).

### Upgrades

* Bump requests from 2.31.0 to 2.32.2 in /requirements. PR [#592](https://github.com/yezz123/authx/pull/592) by [@dependabot[bot]](https://github.com/apps/dependabot).
* ☔ [pre-commit.ci] pre-commit autoupdate. PR [#590](https://github.com/yezz123/authx/pull/590) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ☔ [pre-commit.ci] pre-commit autoupdate. PR [#585](https://github.com/yezz123/authx/pull/585) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ⬆️️️️ Bump jinja2 from 3.1.3 to 3.1.4 in /requirements. PR [#584](https://github.com/yezz123/authx/pull/584) b