Im writing a facebook-connect app that login user after authenticate session on facebook, question is how can i authenticate user on django after get user object?
user = User.objects.get(email=email)
user = authenticate(username=user.username, password=user.password)
login(request, user)
Is there another way to achieve this ?
You don't actually need to authenticate() first if you do this (but I didn't tell you!):
user.backend = 'django.contrib.auth.backends.ModelBackend'
login(request, user)