Module 13 ยท Auth & Security โ Lesson 3 of 3 ยท ~9 min
Protecting routes
The current-user dependency
Every protected route needs to answer one question first: who is making this request? Instead of repeating that logic in every route, FastAPI's Depends runs it once and hands the route a ready-made User.