Hello.
I've set up a python application that uses facebook login and it works fine. I got a new user within django users, all its necessary data within my db however there is one issue.
Each time a new user comes for a first time and logs in, there is a 500 error:
ConnectionRefusedError at /accounts/facebook/login/callback/
[Errno 111] Connection refused
Request Method: GET
Request URL: http://www.thankband.com/accounts/facebook/login/callback/?code=AQAl1nnIjyRMBjiOXmxKQoFCf1olw9XOY6IOFm4Cw4JMVzS_wqNiUGr69_fo88ETL0Y9TZ3LFke0Kt3mdaHtEmSvmgJEeqb14TecZQ3Ni2lhmgPmUZit4SxhgAgtmDeD3aAFvndMiY&state=6XxxxxxxxxxxxO
Django Version: 1.11
Exception Type: ConnectionRefusedError
Exception Value:
[Errno 111] Connection refused
Exception Location: /usr/lib/python3.5/socket.py in create_connection, line 702
Python Executable: /var/www/thankband2/nenv/bin/python
Python Version: 3.5.2
What could be the reason and how can I solve it? Thank you in advance.
Regards
Roustam
app_settings.py
from django.conf import settings
SOCIALACCOUNT_ENABLED = 'allauth.socialaccount' in settings.INSTALLED_APPS
LOGIN_REDIRECT_URL = getattr(settings, 'LOGIN_REDIRECT_URL', '/')
USER_MODEL = getattr(settings, 'AUTH_USER_MODEL', 'auth.User')
Get:
Request information
USER: AnonymousUser
GET Variable
Value state: 'U4wjJg0nqYt5'
code: 'AQCIAOOh_GMzEqq4Q_ogKY5d9YW09R02GEQBGl6rLqW4qK9Oo44Y5-DQoIMylBmXoGSHpbchIlFwb-oO-NAf_0K_kLjZVgPpC3ixyFkD5wI85Qo1IrZrIBhV6ABdRPxjbaf0XVj_tYy-tH44FrONKE_XJOZJ4WpTYyBqkfxb-PQ0ti0je_EMHaTtJ87Q1I2zgHxqJZzjCzLfNuPZxn0KQcqlw8nmF-yMJ2Q-kMn4ltPUp_o8Mvdnq6xfLYCpg6NaPlie08auYkhvkdX3-IbkW08tOyPuAa7ci9ZhBxZM_Y_c5DQ3_7rAuBPu_aALObYSOpE'
views.py
from allauth.socialaccount.models import SocialAccount
What could be the reason and how can I solve it? Thank you in advance.
I am not sure, but its mostly because its trying to send verification email
Yes, it seems you are correct. Don't you know how to disable it?
Closing, not an issue in allauth. Either configure your Django EMAIL_* settings correctly, or disable email verification by using the documented setting.
Yes, a big thanks for your help.
In case someone came across this issue again, just add this line in your settings.py file: ACCOUNT_EMAIL_VERIFICATION = 'none'
In case someone came across this issue again, just add this line in your settings.py file:
ACCOUNT_EMAIL_VERIFICATION = 'none'
what if i want to send email verification sent. (I am getting the same problem when signing a new user up via email and password)
Most helpful comment
In case someone came across this issue again, just add this line in your settings.py file:
ACCOUNT_EMAIL_VERIFICATION = 'none'