functional auth backend; new get_user() method in authentication model & new accompanying test methods

This commit is contained in:
Disco DeDisco
2026-01-30 19:26:02 -05:00
parent 41f4ff1725
commit b12f56c7ca
2 changed files with 19 additions and 0 deletions

View File

@@ -14,3 +14,10 @@ class PasswordlessAuthenticationBackend:
return User.objects.get(email=token.email)
except User.DoesNotExist:
return User.objects.create(email=token.email)
def get_user(self, email):
try:
return User.objects.get(email=email)
except User.DoesNotExist:
return None # might also just pass (which = return None)