Django AllAuth gives an SSLError

I am trying to use AllAuth for authentication on different sites. I tried both Google and Facebook now, and I get the same error for both after successfully registering on sites:

SSLError at /allauth/google/login/callback/ [Errno 185090050] _ssl.c:340: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib 

Can someone help me further? Thanks and best regards.

+4
source share
1 answer

It turned out that ca_certs is missing. The problem is resolved by replacing

 client = httplib2.Http() 

on line 42 and 52 allauth / socialaccount / requests.py with

 client = httplib2.Http(ca_certs=PATH_TO_YOUR_CERT_FILE) 

CERT_FILE will be the cacert.pem file in the certifi module (can be installed via the pip module or macports, etc.).

It seems like an ugly hack, hope for a better solution.

+1
source

Source: https://habr.com/ru/post/1446829/


All Articles