matmarex added a comment.

  In T149672#11952772 <https://phabricator.wikimedia.org/T149672#11952772>, 
@Tgr wrote:
  
  > In theory the session provider autocreates as needed 
<https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/d07054a9973031050f4d4d95e01f142833b799e4/includes/Setup.php#580>.
  
  I added some logging to that code to find out why it fails. There are at 
least 3 different issues:
  
  1. OAuth forbids users that don't exist locally. 
https://gerrit.wikimedia.org/g/mediawiki/extensions/OAuth/+/f45732da9b55385c9d92d8f31defecb0276163f0/src/SessionProvider.php#184
  2. The user must have permission to (auto)create acounts, and since session 
restrictions are checked, and most OAuth clients don't have that permission, it 
will be disallowed.
  3. CentralAuth forbids other auth providers from autocreating accounts. 
https://gerrit.wikimedia.org/g/mediawiki/extensions/CentralAuth/+/e54a69351f95681fa4dee4d1437312d07e0dc3a4/includes/CentralAuthPrimaryAuthenticationProvider.php#472
  
  After bypassing these 3 problems with some hacky code, autocreation worked 
for me locally, but we'll need to figure out why these limitations exist, then 
find nice ways to remove them (problem 2 seems particularly tricky).

TASK DETAIL
  https://phabricator.wikimedia.org/T149672

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to