Disable the simultaneous session in the expiration period

22 views
Skip to first unread message

Naveen Kumar

unread,
Aug 8, 2019, 6:31:15 AM8/8/19
to web...@googlegroups.com
i am working on a project where i want to disable simultaneous user login for same user . currently it is there in web2py version 
2.16.1-stable+timestamp.2017.11.14.05.54.25)

i also want to delete or expire previous session , when user again login with the same user (of which he login priviously).

please suggest some ideas

Lisandro

unread,
Aug 8, 2019, 9:21:02 AM8/8/19
to web2py-users
In this thread you will find an interesting conversation about preventing multiple sessions from the same user:

I use the approach suggested by Massimo: "when a user first logs in, store a uuid in the session and write it in the database (in a new custom field in the auth_user table). When a request arrives if the uuid in the session does not match the uuid in the database call auth.logout()"
Reply all
Reply to author
Forward
0 new messages