I am connecting facebook to an app I have running. In order not to
change a load of code I created a dummy account when someone logs in
through facebook. My only problem is I want to authenticate with this
account when they log  Is there a way to login in a user using the
encrypted password. I am using pyfacebook and FacebookUser is the
following model


class FacebookUser(models.Model):
    user            = models.ForeignKey(User, unique = True)
    fb_uid          = models.CharField( max_length=100, blank = True,
unique = True)

    def __unicode__(self):
        if self.user.username == u'':
            return str(self.pk)
        return self.user.username


the fb_uid is the Facebook id I get back. Here is my view when I get
called from facebook

fb = request.facebook
 try:
      fid = FacebookUser.objects.get(Q(fb_uid = fb.uid))
except FacebookUser.DoesNotExist:
       return ...

name = fid.user
pswd = fid.user.password
user = auth.authenticate(username=name, password=pswd)
 if user is not None and user.is_active:
     auth.login(request, user)


pswd is an encrypted password. Is there a way for me to authenticate
with it?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to