0

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 ?

1 Answers1

4

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

lepture
  • 2,307
  • 16
  • 18
  • Dont you love getting a reply from the author of the lib. I'm running into more issues. E.g. Expecting a PEM-formatted key. I saw the TODO comment in jws._jwk_to_key: TODO: send a PR to PyJWT – Anakin Hao Mar 12 '18 at 04:13
  • Ignore my last comment. That's me using a wrong public key. – Anakin Hao Mar 12 '18 at 04:43
  • Very bad advice; see [The most dangerous code in the world: validating SSL certificates in non-browser software](http://crypto.stanford.edu/~dabo/pubs/abstracts/ssl-client-bugs.html). Perhaps the OP should create a certificate with the proper names. Or show the OP how to do what is necessary so TLS remains enabled. – jww Mar 12 '18 at 19:38
  • 3
    @jww it is ok for testing – lepture Mar 13 '18 at 11:46