Skip to content

Commit

Permalink
Revert "fix(socialaccount): Allow new social logins to establish SITE…
Browse files Browse the repository at this point in the history
…_ID from request"

This reverts commit a255c4b.
  • Loading branch information
pennersr committed Dec 7, 2023
1 parent e5c480c commit a364868
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion allauth/socialaccount/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def _add_social_account(request, sociallogin):

def complete_social_login(request, sociallogin):
assert not sociallogin.is_existing
sociallogin.lookup(request)
sociallogin.lookup()
try:
get_adapter().pre_social_login(request, sociallogin)
signals.pre_social_login.send(
Expand Down
4 changes: 2 additions & 2 deletions allauth/socialaccount/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,12 +274,12 @@ def is_existing(self):
return False
return get_user_model().objects.filter(pk=self.user.pk).exists()

def lookup(self, request=None):
def lookup(self):
"""Look up the existing local user account to which this social login
points, if any.
"""
if not self._lookup_by_socialaccount():
provider_id = self.account.get_provider(request).id
provider_id = self.account.get_provider().id
if app_settings.EMAIL_AUTHENTICATION or app_settings.PROVIDERS.get(
provider_id, {}
).get("EMAIL_AUTHENTICATION", False):
Expand Down

0 comments on commit a364868

Please sign in to comment.