Consider the following scenario:
A wiki sysadmin disables all authentication providers except one. This last available provider is a so called "Link provider", which needs to redirect the user to another, external authentication page, e.g. Google. Now, while the login form could probably look something like:
The sysadmin would maybe want to bypass this confusing and nearly useless form and start the authentication workflow right after the user clicks the "Login" button (in the top right section of the page), or navigates to Special:UserLogin. Renaming the message key used for the login link could indicate, that it will return the user to an external site (e.g. renaming it to "Login with Google").
For this, the UserLogin page would need to check, if there's only one available primary authentication provider and if it's a link provider, that needs a redirect to an external site. It also should be configurable with a feature flag (defaults to false, means disabled).
GoogleLogin provided a similar function in an earlier version (before AuthManager) with the following implementation:
- User clicks the link in the top right, which redirects to Special:GoogleLogin
- Special:GoogleLogin starts the users session (this would, for AuthManager mean to start an authentication workflow?)
- Try to get the user data from Google (will fail, as there's no valid access token)
- Redirect the user to Google to authenticate
- Redirect back to Special:GoogleLogin -> anything else is the same as if this feature would be disabled
Can we implement such a feature into the AuthManager UI? :)