Lately, I have played around with the FastAPI framework, and I am delighted by its speed, rich features, and simplicity. As I am currently working on a web app that manages users via AWS Cognito, I need to secure specific API endpoints in the backend to make sure only logged in users can access them. Luckily, when a user successfully logs into the app, the frontend receives a JSON Web Token (JWT)