aioauth
implements OAuth 2.0 protocol and can be used in asynchronous frameworks like FastAPI / Starlette, aiohttp. It can work with any databases like MongoDB
, PostgreSQL
, MySQL
and ORMs like gino, sqlalchemy or databases over simple BaseStorage interface.
There are few great OAuth frameworks for Python like oauthlib and authlib, but they do not support asyncio and rewriting these libraries to asyncio is a significant challenge (see issues here and here).
- The OAuth 2.0 Authorization Framework
- OAuth 2.0 Token Introspection
- Proof Key for Code Exchange by OAuth Public Clients
- OpenID support
python -m pip install aioauth
Here you can find an example of OAuth 2.0 server implementation using aioauth and FastAPI: https://github.com/aliev/aioauth-fastapi