From 1c5ce890bd8ac393d512866256b31eb4acef04db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Cant=C3=B9?= Date: Thu, 11 Jul 2024 12:25:31 +0200 Subject: [PATCH] disable social account adapter --- src/apps/users/adapters.py | 17 +++++++++-------- src/config/settings/base.py | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/apps/users/adapters.py b/src/apps/users/adapters.py index 7b2b104..8f2c41c 100644 --- a/src/apps/users/adapters.py +++ b/src/apps/users/adapters.py @@ -3,7 +3,8 @@ from typing import Self from allauth.account.adapter import DefaultAccountAdapter -from allauth.socialaccount.adapter import DefaultSocialAccountAdapter + +# from allauth.socialaccount.adapter import DefaultSocialAccountAdapter from django.conf import settings from django.http import HttpRequest @@ -13,11 +14,11 @@ def is_open_for_signup(self: Self, request: HttpRequest) -> bool: return getattr(settings, "ACCOUNT_ALLOW_REGISTRATION", True) -class SocialAccountAdapter(DefaultSocialAccountAdapter): - """ - just for debugging obscure integration exceptions - """ +# class SocialAccountAdapter(DefaultSocialAccountAdapter): +# """ +# just for debugging obscure integration exceptions +# """ - def authentication_error(self, *args, **kwargs): - print(args, kwargs) - return super().authentication_error(*args, **kwargs) +# def authentication_error(self, *args, **kwargs): +# print(args, kwargs) +# return super().authentication_error(*args, **kwargs) diff --git a/src/config/settings/base.py b/src/config/settings/base.py index 98c460a..2afae3c 100644 --- a/src/config/settings/base.py +++ b/src/config/settings/base.py @@ -317,7 +317,7 @@ ACCOUNT_EMAIL_VERIFICATION = "none" # https://django-allauth.readthedocs.io/en/latest/configuration.html ACCOUNT_ADAPTER = "apps.users.adapters.AccountAdapter" -SOCIALACCOUNT_ADAPTER = "apps.users.adapters.SocialAccountAdapter" +# SOCIALACCOUNT_ADAPTER = "apps.users.adapters.SocialAccountAdapter" # https://django-allauth.readthedocs.io/en/latest/forms.html ACCOUNT_FORMS = {"signup": "apps.users.forms.UserSignupForm"}