lepture / authlib

The ultimate Python library in building OAuth, OpenID Connect clients and servers. JWS,JWE,JWK,JWA,JWT included.
https://authlib.org/
BSD 3-Clause "New" or "Revised" License
4.52k stars 452 forks source link

Have a WSGI integration example #623

Open zogzog opened 8 months ago

zogzog commented 8 months ago

Problem

There are very nice integration examples but none does seem to address the construction of a WSGI based OAuth2 management suite.

We have to equip a quite complex Flask App with OAuth2 + OIDC and we did it through a significant amount of reverse engineering, following the architecture found in the flask integration folder.

The current integration has some apparent shortcomings:

Hence we believe the lack of a nice WSGI integration example is a situation that might be fixed.

We might provide an overview of what we did to achieve that, though that might not be good enough for a good integration (what needs to be done is still unclear).