Getting KeyError of missing `code` argument

117 views Asked by At

I use authlib with MSAD and I am getting KeyError on line: https://github.com/lepture/authlib/blob/master/authlib/integrations/flask_client/integration.py#L43

My question is if there has to be always code argument within request or IMHO this is bug and it should be checked by get() method same as state.

I use it with flask and after proper registration of MSAD client I try method authorize_access_token() and from here I get to the poit of code I mentioned above and get error.

Thanks for any advice.

Vit

1

There are 1 answers

0
lepture On

Are you using debug mode of Flask? In production, this code will raise 400 Bad request error.