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.55k stars 452 forks source link

Does the Starlette integration store a dict only to try and parse it as JSON? #478

Closed haggen closed 2 years ago

haggen commented 2 years ago

See https://github.com/lepture/authlib/blob/10cec2518fe0cc275897f12ae3683d4823f82928/authlib/integrations/starlette_client/integration.py#L19

It tris to parse a JSON string. But a few lines below cache data is set as a simple dict.

https://github.com/lepture/authlib/blob/10cec2518fe0cc275897f12ae3683d4823f82928/authlib/integrations/starlette_client/integration.py#L39

Base framework class as reference: https://github.com/lepture/authlib/blob/169c7dcfc47478c8d55553cc95fb0f5578162b77/authlib/integrations/base_client/framework_integration.py#L46