When disabling all authentication method other than one link provider (e.g. by installing the GoogleLogin extension and setting $wgAuthManagerAutoConfig['primaryauth'] = ; in LocalSettings.php), the login form is skipped when the user clicks on login for the users convenience. However, this also prevents the user to check the "keep me logged in" checkbox, so that his session keeps set for a longer time. This is not very nice, as the user may want to be kept logged in on the current system.
Possible solutions would be:
- Remove the feature to automatically redirect to the link provider, this however, would introduce a one more click and pageview, which is not really needed unfortunately :/
- Always keep the user logged in then only a link provider is used, this however might be a security issue, especially if the user is logging in in an unsafe environment
- Probably provide a way of extending the session after the successful login, however, I've no idea how this could look like
Original task description:
https://www.mediawiki.org/wiki/Extension:GoogleLogin#$wgGLShowKeepLogin states "the Keep me logged in checkbox now applies to all authentication methods, including GoogleLogin"
We are using Google Login with $wgAuthManagerAutoConfig['primaryauth'] = ; set, so that we can just have Google Login, but because of this we don't get the Login form that allows us to check "Keep me logged in". As such, we don't get the mediawikiToken cookie, and we get logged out when we close the browser.
Even if I enable the login form, unless we click "Keep me logged in" before clicking Login with Google, we don't get the mediawikiToken cookie, just the session cookies. So the statement in the docs is wrong about Keep me logged in applying to all authentication methods is wrong.
Is something needing to be fixed in the GoogleLogin code so it's automatically applied, or has something in Mediawiki changed preventing this from working. Ideally, regardless of the login form being shown or not, it would be good for all Google Logins to have the mediawikiToken cookie being created.