Learn the basics of FastAPI, how to quickly set up a server and secure endpoints with Auth0. By Mark Halpin.
FastAPI is a relatively new Python framework that enables you to create applications very quickly. This framework allows you to read API request data seamlessly with built-in modules and is a lightweight alternative to Flask.
The article then deals with:
- Get started with FastAPI
- Create a private endpoint
- Set up Auth0 an API
- Add JSON Web Token (JWT) validation
- Validate an Auth0 access token
You will learn the basics of FastAPI by implementing two endpoints - one public, one private. You will see how simple it is to make requests to both of these endpoints. You will also create a verification class and saw how PyJWT helps you validate an Auth0 access token, and you will learn what JWKS is. Nice one.
[Read More]