feat(account): WIP
This commit is contained in:
parent
6caf3dbf61
commit
f6fcd90622
1 changed files with 4 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
|||
import logging
|
||||
from functools import lru_cache
|
||||
from typing import Optional
|
||||
|
||||
|
@ -11,6 +12,8 @@ from django.utils.translation import gettext_lazy as _
|
|||
|
||||
from dgsi.models import Translation, User
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class SharedAccountAdapter(DefaultSocialAccountAdapter):
|
||||
"""
|
||||
|
@ -49,6 +52,7 @@ class SharedAccountAdapter(DefaultSocialAccountAdapter):
|
|||
return sociallogin.account.extra_data["preferred_username"]
|
||||
|
||||
case _:
|
||||
logger.warning(sociallogin.user)
|
||||
# INFO: This should never happen
|
||||
messages.error(request, _("Méthode de connexion invalide."))
|
||||
raise ImmediateHttpResponse(
|
||||
|
|
Loading…
Reference in a new issue