Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions docs/examples/real_world_example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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'