Chore: add some output of social login errors

This commit is contained in:
shamoon 2025-12-02 10:27:20 -08:00
parent 6f3451bce0
commit 051c786b1b
No known key found for this signature in database

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_id,
error,
exception,
extra_context,
):
"""
Just log errors and pass them along.
"""
logger.warning(
f"Social authentication error for provider `{provider_id}`: {error!s} ({exception!s})",
)
return super().on_authentication_error(
request,
provider_id,
error,
exception,
extra_context,
)