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,910 points
1,116 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,300 points

Related Questions In Python

+1 vote
2 answers

Error:Django gives Bad Request (400) when DEBUG = False

Tried this and it resolved all my ...READ MORE

answered Sep 25, 2020 in Python by Agaba
6,212 views
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
• 58,020 points
6,396 views
0 votes
1 answer
0 votes
1 answer
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
1,973 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
• 58,020 points
1,745 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,300 points
5,065 views
+1 vote
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,300 points
5,151 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP