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 in Python by ana1504.k
• 7,470 points
22 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 by SDeb
• 12,360 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
• 56,160 points
788 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 ariaholic
• 7,320 points
100 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,790 points
107 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
• 56,160 points
89 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 in Python by SDeb
• 12,360 points
121 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 in Python by SDeb
• 12,360 points
61 views