matthiask / django-authlib

Utilities for passwordless authentication (using magic links, Google, Facebook and Twitter OAuth currently)
https://django-authlib.readthedocs.io/
MIT License
65 stars 11 forks source link

ModelBackend as base class for EmailBackend #6

Closed vaidik closed 3 years ago

vaidik commented 3 years ago

Why is this not using ModelBackend as the base class - https://github.com/matthiask/django-authlib/blob/master/authlib/backends.py#L5

I encountered permission issues with this when the user is not a superuser. Particularly because EmailBackend does not implement has_module_perms. None of the permissions would work.

On extending ModelBackend, it worked fine for me

matthiask commented 3 years ago

This is an excellent question. I'm not sure why, to be honest.

Do you want to submit a pull request? We can let the testsuite decide whether there's a reason for this.