Appendix B. Setting up Auth0 for authentication and authorization
This appendix walks you through the process of setting up and configuring Auth0 to handle authentication and authorization for your APIs. Specifically, we will
- Register an API, which we will call “Orders API.”
- Register a client that uses the authorization code flow to allow users to log in and use the API.
- Create an admin role for the API.
This setup is necessary if you want to be able to code along with the practical examples in chapter 8. After reading this appendix, you’ll be ready to configure Auth0 for your own applications and projects. If you wish you use complimentary video material to this appendix, I have created a series of videos on this topic that you will find useful:
- “Setting up Auth0 for API authentication and authorization” (https://youtu.be/PbUcQUQ7K2o).
- “Login and issue API access tokens with Auth0 and FastAPI” (https://youtu.be/ato2S5b27o8).
- “Validate JWTs issued by Auth0 in FastAPI” (https://youtu.be/AtmyC945_no).