I am new to Django and am trying to understand how the customized authentication backend works in this case (Sorry if the question is too simple). In django_facebook/auth_backends.py, we have an authenticate function with facebook_id and facebook_email as parameters.
The authenticate method takes a request argument and credentials as keyword arguments. Most of the time, it’ll just look like this:
class MyBackend(object):
def authenticate(self, request, username=None, password=None):
# Check the username/password and return a user.
...
So the method signature does not match Django's specification; how does it work correctly?
Also, I did notice that in django_facebook/registration_backends.py, there is another authentication function in class FacebookRegistrationBackend(NooptRegistrationBackend) that matches the documentation. Is this related to the authentication backend? And what is the relation between an "authentication backend" and a "registration backend"?
I am new to Django and am trying to understand how the customized authentication backend works in this case (Sorry if the question is too simple). In
django_facebook/auth_backends.py
, we have an authenticate function withfacebook_id
andfacebook_email
as parameters.However, according to Django's official documentation:
Also, I did notice that in
django_facebook/registration_backends.py
, there is another authentication function inclass FacebookRegistrationBackend(NooptRegistrationBackend)
that matches the documentation. Is this related to the authentication backend? And what is the relation between an "authentication backend" and a "registration backend"?Thanks, appreciate your help!