remember me unexpected behavior
Added by Emir Cem about 13 years ago
Hello,
In Hangman example, when i logged in with checking remember me checkbox and duplicate web browser tab, and log out in tab. I can continue to play in another tab. For example in facebook when i logged in and duplicate browser tab, and log out in one tab. I can't continue in other tab. Why wt auth module acts this way?
Regards,
Emir Cem
Replies (2)
RE: remember me unexpected behavior - Added by Wim Dumon about 13 years ago
Hello Emir,
Authentication and session management are not the same thing in Wt.
Authentication links your session to a user (and logout breaks that link between user and session). In hangman, for example, subsequent login/logout actions from the same tab without hitting reload, will reuse your Wt session for multiple users. Note that you can, however, decide to call WApplication::quit() to end your session on logout.
Hitting the logout button in one session will not have an effect of the logged in/not logged in status of a different session (a different tab causes a different WApplication object to be created, and is hence a different session).
To achieve what you're looking for, a form of inter-session communication is required, most likely by inspecting the cookie database on every request. It seems to me that you can do this in WApplication::notify().
Best regards,
Wim.
RE: remember me unexpected behavior - Added by Emir Cem about 13 years ago
Hello Wim,
Thanks for help.
Regards,
Emir Cem