T362706: Permit displaying the login / signup page in a popup or iframe adds the ability to do the login / signup flow inside a popup window. One use case for this is "asynchronous login": you are prevented in some workflow (e.g. trying to save an edit) because you are not logged in, maybe because your session just expired; the UI detects this and offers a login button, which opens a popup with a login screen, and after successful popup, the UI updates accordingly.
In practice this means:
- Provide a convenience Javascript method for opening a login or signup popup (which should be fairly straightforward, but we don't want to force callers to hardcode things like window size, so it's better to centralize it)
- Skip post-login/signup output that's not meant for a popup window (UserLoginComplete, BeforeWelcomeCreation, PostLoginRedirect; possibly / CentralAuthPostLoginRedirect although that's going to be more tricky because sometimes the redirect is used for data transfer, not UI purposes).
- Somehow (postMessage?) communicate back the result of the process to the method that initiated the popup. Maybe also things like the PostLoginRedirect URL or the BeforeWelcomeCreation HTML snippet.
This might also be a good time to do something about the CentralAuth feature of updating the personal toolbar after a successful autologin: either migrate it to core and provide a proper extension point for affected features (like the Echo notification badges), or kill it and alwayws request a reload. (See T245441, T122652.)
We can probably merge T71596: Provide JavaScript login widget into this.