Implemented the oauth2 integration between FastAPI and Authlib by gmachado-nextreason · Pull Request #278 · authlib/authlib

Thanks for quick review @lepture.

Although FastAPI supports third party non async libraries:
fastapi/fastapi#260
https://fastapi.tiangolo.com/async/

"If you are using a third party library that communicates with something (a database, an API, the file system, etc) and doesn't have support for using await, (this is currently the case for most database libraries), then declare your path operation functions as normally, with just def"

As you can see on the routes.py example, I created all the endpoints without async:
https://github.com/gmachado-nextreason/example-oidc-server-fastapi/blob/master/src/routes.py

This is just a proposed integration solution between FastAPI and Authlib without async. I'm aware authlib only supports async for client not server yet (#63), just wanted to provide more options if anyone else is interested. Please let me know if it is still not the case. Glad to help anyhow.