SourceC
SourceC

Reputation: 3929

How can I prevent all Firefox browser instances from using the same authentication cookie?

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.

How can I prevent this sort of behavior so that each browser instance would receive its own authentication cookie?

Upvotes: 0

Views: 2228

Answers (3)

Matthew Flaschen
Matthew Flaschen

Reputation: 285017

I second that your question is vaguely worded. Firefox allows you to have an arbitrary number of cookie sets. Each set must be part of a Firefox profile. Each profile can have an arbitrary number of windows and processes open (note, to avoid joining an existing process you must use no-remote).

I think you have been using multiple windows with the same profile, which are expected to share a cookie set.

Upvotes: 1

John Saunders
John Saunders

Reputation: 161821

A quick experiment showed me what Shog9 is implying. Start Firefox. Then start another "instance" of Firefox. Then look in Task Manager, and you'll see that you only have a single firefox.exe process running.

I presume he means that you have never actually seen two instances of Firefox. You've only seen the same instance running two windows. Naturally, those share the same cookies.

I presume this implies that in order to actually have separate instances, they'll have to run under separate logins or perhaps user profiles, and they will have separate sets of cookies.


EDIT: some resources on profiles in FireFox:

Upvotes: 3

Shog9
Shog9

Reputation: 159688

Each browser instance will have its own set of cookies. And history. And bookmarks. Because each running instance will need to be attached to its own profile.

Any given instance can have multiple tabs and windows open however. And those will share cookies. If that doesn't work for you, then don't use cookies...

If you just want this to make testing easier, why not set up a separate testing profile and launch a separate instance of Firefox attached to that?

Upvotes: 5

Related Questions