Django-allauth seems to just be a basket of woes, but I figured I'd toss this one out there to see if anyone has seen similar:
I have Google and Facebook social logins configured. They work fine for me. They work fine for most people. Huzzah!
For some people, even when they use different browsers/OSes/etc, attempting a social login generates an error. On the callback, they get "Server error" "An error occurred while processing your request."
These errors are generated to me as the admin, and in the elided environment section SITE_ID is indeed 0, but I'm at a loss to imagine why this happens only sometimes!
Any pointers for investigation?
--Jered
Internal Server Error: /accounts/google/login/callback/
ImproperlyConfigured at /accounts/google/login/callback/ You're using the Django "sites framework" without having set the SITE_ID setting. Create a site in your database and set the SITE_ID setting or pass a request to Site.objects.get_current() to fix this error. [...] Traceback (most recent call last): File "/opt/app-root/src/.local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 56, in inner response = get_response(request) File "/opt/app-root/src/.local/lib/python3.9/site-packages/django/core/handlers/base.py", line 197, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/opt/app-root/src/.local/lib/python3.9/site-packages/allauth/socialaccount/providers/oauth2/views.py", line 84, in view return self.dispatch(request, *args, **kwargs) File "/opt/app-root/src/.local/lib/python3.9/site-packages/allauth/socialaccount/providers/oauth2/views.py", line 162, in dispatch return complete_social_login(request, login) File "/opt/app-root/src/.local/lib/python3.9/site-packages/allauth/socialaccount/helpers.py", line 197, in complete_social_login sociallogin.lookup() File "/opt/app-root/src/.local/lib/python3.9/site-packages/allauth/socialaccount/models.py", line 282, in lookup provider_id = self.account.get_provider().id File "/opt/app-root/src/.local/lib/python3.9/site-packages/allauth/socialaccount/models.py", line 141, in get_provider provider = self._provider = adapter.get_provider( File "/opt/app-root/src/.local/lib/python3.9/site-packages/allauth/socialaccount/adapter.py", line 204, in get_provider app = self.get_app(request, provider=provider) File "/opt/app-root/src/.local/lib/python3.9/site-packages/allauth/socialaccount/adapter.py", line 284, in get_app apps = self.list_apps(request, provider=provider, client_id=client_id) File "/opt/app-root/src/.local/lib/python3.9/site-packages/allauth/socialaccount/adapter.py", line 231, in list_apps db_apps = SocialApp.objects.on_site(request) File "/opt/app-root/src/.local/lib/python3.9/site-packages/allauth/socialaccount/models.py", line 27, in on_site site = get_current_site(request) File "/opt/app-root/src/.local/lib/python3.9/site-packages/django/contrib/sites/shortcuts.py", line 16, in get_current_site return Site.objects.get_current(request) File "/opt/app-root/src/.local/lib/python3.9/site-packages/django/contrib/sites/models.py", line 63, in get_current raise ImproperlyConfigured(
Exception Type: ImproperlyConfigured at /accounts/google/login/callback/ Exception Value: You're using the Django "sites framework" without having set the SITE_ID setting. Create a site in your database and set the SITE_ID setting or pass a request to Site.objects.get_current() to fix this error. Raised during: allauth.socialaccount.providers.oauth2.views.view [... internal state elided ...]