I implemented Forms authentication by creating Default.aspx
and custom login page named login.aspx
. If unauthenticated users brows to Default.aspx
, they are redirected to login.aspx
, and only if match is found for the supplied credentials, is user redirected to default.aspx
.
But when using Firefox, it appears all browser instances use the same authentication cookie instance, and thus if user in browser B1 logs in as user U1, then all browser instances visiting that web application will be logged in as user U1. So if for example browser instance B1 requests Default.aspx for the first time, it will immediately be granted access.
If, after I logged in as user U1, I surf to
login.aspx
and log in using different username (say user U2), then on postbacks all browser(previously logged in as user U1) will now be logged in as user U2.
How can I prevent this sort of behavior so that each browser instance would receive its own authentication cookie?