Hi Jon, when you finnish the facebook connect with autologin plugin,
could you please share it with us? it's very interesting for all the
projects.
thanks in advance,
alex
El 31/01/2010 16:08, Jon Romero escribió:
I have created a new facebook connect plugin where the user can login
to auth using FBConnect.
The thing that I am doing is after the user has logged in (and I have
his fb_uid) I create a new session like this:
if not auth.is_logged_in():
user_obj = Storage(user_table._filter_fields(Users.find_by_id
(user_id)[0], id=True))
session.auth = Storage(user=user_obj, last_visit=request.now,
expiration=2600)
where Users.find_by_id(user_id) assume it's db(db.users.id ==
user_id).select()
Even though it seems to work, I don't think it is correct (because if
it is THAT simple for everyone to
create an auth object then he can hack the system).
I checked the auth.requires_login but I couldn't figure it out.
So, how can I create a new session programmatically (like the login
page does)?
--
Alejandro Fanjul Fdez.
[email protected]
www.mhproject.org
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en.