diff --git a/docs/examples/real_world_example.rst b/docs/examples/real_world_example.rst index e85a94ab..8d6c3ee9 100644 --- a/docs/examples/real_world_example.rst +++ b/docs/examples/real_world_example.rst @@ -84,17 +84,23 @@ This example is lovingly borrowed from `this gist **N.B:** -You should note that Oauth2 works through SSL layer. If your server is not parametrized to allow HTTPS, the *fetch_token* -method will raise an **oauthlib.oauth2.rfc6749.errors.InsecureTransportError** . -Most people don't set SSL on their server while testing and that is fine. You can disable this check in two ways: +You should note that Oauth2 works through SSL layer. If your server is not +parametrized to allow HTTPS, the *fetch_token* +method will raise an **oauthlib.oauth2.rfc6749.errors.InsecureTransportError**. +Most people don't set SSL on their server while testing and that is fine. You +can disable this check in two ways: 1. By setting an environment variable. +.. code-block:: bash + export OAUTHLIB_INSECURE_TRANSPORT=1 -2. Equivalent to above you can set this in Python (if you have problems setting environment variables) +2. Equivalent to above you can set this in Python (if you have problems +setting environment variables) -# Somewhere in webapp_example.py, before the app.run for example +.. code-block:: python + # Somewhere in webapp_example.py, before the app.run for example import os os.environ['OAUTHLIB_INSECURE_TRANSPORT'] = '1'