如何在不使用https的情况下使用authlib

时间:2019-05-31 08:40:07

标签: python oauth authlib

我想知道是否有一种方法可以告诉authlib在我的开发环境中忽略HTTPS的不足,而不是抛出InsecureTransportError

1 个答案:

答案 0 :(得分:0)

here所述,您可以设置环境变量:

export AUTHLIB_INSECURE_TRANSPORT=1

或者如果您要通过编程方式进行设置

# Somewhere in webapp_example.py, before the app.run for example
import os 
os.environ['AUTHLIB_INSECURE_TRANSPORT'] = '1'