Skip to content

Commit

Permalink
disable social account adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
nicokant committed Jul 11, 2024
1 parent a42c133 commit 1c5ce89
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
17 changes: 9 additions & 8 deletions src/apps/users/adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
2 changes: 1 addition & 1 deletion src/config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"}

Expand Down

0 comments on commit 1c5ce89

Please sign in to comment.