Allow displaying multiple concurrent authentication prompts (for tab-modal prompts)

NEW
Unassigned

Status

()

5 years ago
3 years ago

People

(Reporter: Dolske, Unassigned)

Tracking

(Depends on: 2 bugs)

unspecified
Points:
8
Dependency tree / graph
Bug Flags:
firefox-backlog +

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
Long, long, ago in a galaxy far, far away we implemented bug 475053 to suppress multiple concurrent HTTP auth prompts. Having a flurry of window-modal prompts appear when opening a browser/page is terrible UX, so we serialized the authentication. Only 1 prompt will be shown at a time.

We need to carefully undo a bit of that for tab-modal prompts...

There should still only ever be 1 prompt shown in a tab, but we need to allow different tabs to each be showing a prompt. Otherwise switching to another tab and doing something that requires authentication will just silently hang.

[This is actually a bit of an existing bug, since the current prompts are window-modal but not app-modal... Trigger a HTTP auth prompt from one window, then switch to another window and try to trigger another. It will get stuck in a loading state with no prompt shown until you handle the prompt in the first window. Tab-modal prompts are more likely to cause this condition, since they're easier to ignore/miss.]

I think fixing this will mostly involve changes in nsLoginManagerPrompter's _doAsyncPrompt(), as invoked from asyncPromptAuth() there. Basically, instead of a single global queue (_asyncPrompts), each tab should have its own. Or some solution isomorphic to that.

Doing this results in a few other problems to solve, which I'll file as separate dependencies. TBD if they can actually be fixed separately, but the general architecture should at least account for them.
(Reporter)

Updated

5 years ago
Depends on: 1029786
(Reporter)

Updated

5 years ago
Depends on: 1029815
Flags: firefox-backlog+
Points: --- → 8
You need to log in before you can comment on or make changes to this bug.