Django AllAuth gives SSLError

0 votes
I am using AllAuth to authenticate into different sites. I tried for both Google and Facebook now, and I am getting the same error for both after successfully logging into the 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 anyone tell me how to fix this?
Mar 20, 2019 in Python by ana1504.k
• 7,890 points
84 views

1 answer to this question.

0 votes
It can be fixed by replacing:

client = httplib2.Http()

in line 42 and 52 of allauth/socialaccount/requests.py with

client = httplib2.Http(ca_certs=PATH_TO_YOUR_CERT_FILE)
 

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

You can look for better solutions too.
answered Mar 20, 2019 by SDeb
• 13,230 points

Related Questions In Python

0 votes
1 answer

Django form validation: making “required” conditional?

This is done with the clean method on the ...READ MORE

answered Aug 30, 2018 in Python by Priyaj
• 57,530 points
1,843 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How to switch pages using Ajax in Django?

You should use django-pjax which is built exactly for ...READ MORE

answered Oct 9, 2018 in Python by aryya
• 7,350 points
265 views
0 votes
1 answer

how to download and install Django rest framework?

To install Django, you can simply open ...READ MORE

answered Apr 24, 2018 in Python by Christine
• 15,810 points
266 views
0 votes
1 answer
0 votes
1 answer

Host not allowed

Go to your project directory cd project cd project ALLOWED_HOSTS ...READ MORE

answered Aug 9, 2018 in AWS by Priyaj
• 57,530 points
320 views
0 votes
1 answer

How do you configure Django to send mail through Postfix?

You can do this by adding  settings.py ...READ MORE

answered Feb 25, 2019 in Python by SDeb
• 13,230 points
1,006 views
0 votes
1 answer

Django model iterate fields

You can try the following: getattr(foo.__class__, <field_name>)   This should ...READ MORE

answered Apr 10, 2019 in Python by SDeb
• 13,230 points
832 views