Search code examples
sslauthlib

how to turn off ssl check in Authlib


I'm using authlib in my project. I have a local IDP setup using http atm. For testing, this code is blocking me because my dev environment is http.

https://github.com/lepture/authlib/blob/master/authlib/client/oauth2.py#L155

I can carry on by commenting out the line. But, i think having a way to turn of https check is neater.

So, dose anyway know a way to turn off https check in Authlib ?


Solution

  • It can be solved by setting an environment:

    AUTHLIB_INSECURE_TRANSPORT=true
    

    This is not documented on client sections, it is documented on the server parts like https://docs.authlib.org/en/latest/flask/oauth2.html