Chore: add some output of social login errors (#11527)

This commit is contained in:
shamoon authored and GitHub committed 2025-12-03 18:52:49 +00:00
1 parent 2e5bd02e7e
commit ce642409e8
2 files changed
+36

No files matched your search

+22
View File
@@ -137,3 +137,25 @@ class CustomSocialAccountAdapter(DefaultSocialAccountAdapter):
user.save()
handle_social_account_updated(None, request, sociallogin)
return user
def on_authentication_error(
self,
request,
provider,
error=None,
exception=None,
extra_context=None,
):
"""
Just log errors and pass them along.
"""
logger.warning(
f"Social authentication error for provider `{provider!s}`: {error!s} ({exception!s})",
)
return super().on_authentication_error(
request,
provider,
error,
exception,
extra_context,
)