Constructor
new AuthPopup(config)
#
Parameters:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object |
Properties:
|
Methods
startIframe() → {Promise.<any>}
#
Open the login form in an iframe in a modal message dialog.
In order for this to work, the wiki must be configured to allow the login page to be framed ($wgEditPageFrameOptions), which has security implications.
Add a button to provide an alternative method to log in, just in case.
Returns:
Resolved when the login succeeds with the value returned by the
checkLoggedIn
callback. Resolved with a falsy value if the user cancels the process.
Rejected when an unexpected error stops the login process.
- Type
- Promise.<any>
startNewTabOrWindow() → {Promise.<any>}
#
Open the login form in a new browser tab or window.
In the parent window, display a backdrop message dialog, to provide an alternative method to log in if the browser refuses to open the window, and to allow the user to restart the process if they lose track of the new tab or window.
This should only be called in response to a user-initiated event like 'click', otherwise the user's browser will always refuse to open the window.
Returns:
Resolved when the login succeeds with the value returned by the
checkLoggedIn
callback. Resolved with a falsy value if the user cancels the process.
Rejected when an unexpected error stops the login process.
- Type
- Promise.<any>
startPopupWindow() → {Promise.<any>}
#
Open the login form in a small browser popup window.
In the parent window, display a backdrop message dialog with the same dimensions, to provide an alternative method to log in if the browser refuses to open the window, and to allow the user to restart the process if they lose track of the popup window.
This should only be called in response to a user-initiated event like 'click', otherwise the user's browser will always refuse to open the window.
Returns:
Resolved when the login succeeds with the value returned by the
checkLoggedIn
callback. Resolved with a falsy value if the user cancels the process.
Rejected when an unexpected error stops the login process.
- Type
- Promise.<any>