authlib / example-oauth2-server

Example for OAuth 2 Server for Authlib.
https://authlib.org/
685 stars 285 forks source link

Getting insecure_transport error even after setting AUTHLIB_INSECURE_TRANSPORT=1 #37

Closed sw-devendra closed 6 years ago

sw-devendra commented 6 years ago

Hi,

I am trying to test basic sequence of OAuth to learn the protocol and use the same on my server. I have started the example-oauth2-server after calling export AUTHLIB_INSECURE_TRANSPORT=1 but still, I am seeing "insecure_transport" error in the first step of authorization code grant type. I also tried password grant type as you showed in your example and that too responded with the same error.

What could be the reason?

curl http://127.0.0.1:8080/oauth/authorize?response_type=code&client_id=CLIENT-ID&redirect_uri=SOME-URL&scope=read

I get response "insecure_transport" (tried with browser also and got same response)

sw-devendra commented 6 years ago

I found the reason for the error. I was using "sudo flask run" which clips local environment variables. Dropping sudo or using -E solved the issue.

AbobakrAlduais commented 5 years ago

try export AUTHLIB_INSECURE_TRANSPORT=true

sanxchep commented 3 years ago

try export AUTHLIB_INSECURE_TRANSPORT=true

God