Authtuna – a Modern, Async Security Framework for Fastapi
Key topics
Hey everyone, creator of AuthTuna here.
For years, I've been building complex, multi-tenant APIs with FastAPI, and I've always found that implementing robust, granular, and truly async security is a huge pain point. You either roll your own and risk vulnerabilities, or you wrestle with frameworks that aren't async-native, causing performance bottlenecks.
I built AuthTuna to solve this. It's the async-first security framework I always wanted:
Truly Async Core: Built on asyncio and SQLAlchemy 2.0. No part of your security logic will block the event loop.
Granular Hierarchical Permissions (RBAC): Go beyond simple roles. You can define permissions like Organization -> Project -> Resource and check them with a simple Depends(PermissionChecker(...)).
Advanced Server-Side Sessions: It provides the security of server-side sessions (with hijack detection) without sacrificing the performance you'd expect from JWTs.
Great Developer Experience: Comes with Pydantic models, pre-built routers for auth flows, and clear dependencies to get you started in minutes.
I use it in my own production systems, so it's been well tested. The goal is to make robust security the easy path, not an afterthought.
I'd love to hear your thoughts and get your feedback. What are you currently using to handle auth in your async Python projects?
Author introduces AuthTuna, a modern async security framework for FastAPI, and seeks community feedback.
Snapshot generated from the HN discussion
Discussion Activity
Light discussionFirst comment
8m
Peak period
1
0-1h
Avg / period
1
Key moments
- 01Story posted
Sep 15, 2025 at 10:06 AM EDT
4 months ago
Step 01 - 02First comment
Sep 15, 2025 at 10:14 AM EDT
8m after posting
Step 02 - 03Peak activity
1 comments in 0-1h
Hottest window of the conversation
Step 03 - 04Latest activity
Sep 15, 2025 at 10:14 AM EDT
4 months ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
Does FastAPI has a mechanism to add external modules? Like Django calls it an app. People can make open-source Django apps and others can easily include them in their own Django project base.
Good job on launching!