I seem to be having an issue with SSL whenever trying to use oAuth2 in Python. I\'ve spent most of the afternoon attempting to debug it but can\'t seem to figure it out.
I was running into the same issue with Flask-Social's OAuth call to Facebook. The easiest solution is to install httplib2.ca_certs_locator plug-in.
In httplib2.init.py, there is a check built-in for loading certificates from another source instead of the cacerts.txt file provided with the library:
try:
# Users can optionally provide a module that tells us where the CA_CERTS
# are located.
import ca_certs_locater
CA_CERTS = ca_certs_locater.get()
except ImportError:
# Default CA certificates file bundled with httplib2.
CA_CERTS = os.path.join(
os.path.dirname(os.path.abspath(__file__ )), "cacerts.txt")
Installing this plug-in fixed the problem for me with no code-changes/hack-a-rounds.