I'm having difficulty moving my django 1.9.3 app from local development to production on Heroku, specifically using allauth (0.25.2) to login via Twitter.
It appears I'm having the same problem as django allauth not working on production yet that answer does not work for me.
When I'm running the dev server, everything works with the callback url on twitter set to http://127.0.0.1:8000/accounts/twitter/login/callback/
.
When I switch it to either http://{myappname}.herokuapp.com/accounts/twitter/login/callback/
or http://{myappname}.herokuapp.com/accounts/twitter/login/callback/
and access the app on Heroku, I get a 500 error when I try to login via Twitter, being redirected to https://{myappname}.herokuapp.com/accounts/twitter/login/?process=login
I'm including the following settings in settings.py, which I've tried toggling during my troubleshooting:
ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_EMAIL_VERIFICATION = "mandatory"
ACCOUNT_EMAIL_SUBJECT_PREFIX = "[{myappname}] "
ACCOUNT_LOGIN_ATTEMPTS_LIMIT = {number}
ACCOUNT_LOGIN_ATTEMPTS_TIMEOUT = {number}
ACCOUNT_LOGIN_ON_EMAIL_CONFIRMATION = False
ACCOUNT_LOGOUT_ON_PASSWORD_CHANGE = True
ACCOUNT_LOGOUT_REDIRECT_URL = "/"
SOCIALACCOUNT_EMAIL_REQUIRED = ACCOUNT_EMAIL_REQUIRED
And for production (again, have tried toggling these):
SECURE_CONTENT_TYPE_NOSNIFF = True
SECURE_BROWSER_XSS_FILTER = True
SECURE_SSL_REDIRECT = True
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True
CSRF_COOKIE_HTTPONLY = True
X_FRAME_OPTIONS = 'DENY'
I've also tried refreshing the auth keys. Any ideas of what I'm doing wrong?