functional auth backend; new get_user() method in authentication model & new accompanying test methods
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user