Page MenuHomePhabricator

Update requireLogin() for temp users on OAuth extension
Closed, ResolvedPublic

Description

In T344276, we want to make sure the SpecialPage::requireLogin() function is used in accordance with the introduction of temporary users. As for now, we want to treat temporary users just like anonymous or IP users.

Request:
Should requireLogin() be available to temporary users?
If yes, no update is needed.
If not, requireNamedUser must return true instead.

Notes:
RequireLogin was found in the following files:
src/Frontend/SpecialPages/SpecialMWOAuth.php
src/Frontend/SpecialPages/SpecialMWOAuthConsumerRegistration.php
Code Search Link

Event Timeline

I think it makes sense to allow temp users to use OAuth apps (although this puts some burden on app developers to e.g. be ready of the preferences API not being available for some users, but then very few OAuth apps use preferences). It probably doesn't make sense to let them author OAuth apps.

@Madalina do you have an opinion on this from a product perspective? There is also a discussion here https://www.mediawiki.org/wiki/Talk:Trust_and_Safety_Product/Temporary_Accounts

Has there been a consensus on this? My understanding is that temporary users can be allowed to use OAuth apps at a later if we restrict it now.

Has there been a consensus on this? My understanding is that temporary users can be allowed to use OAuth apps at a later if we restrict it now.

We should not let temporary accounts use the SpecialMWOauth* pages for now. We might change this later. See also Update error message for temp users trying to use special pages which has some overlap with this task ( cc @Dreamy_Jazz).

Amdrel changed the task status from Open to In Progress.Sep 24 2024, 8:43 PM
Amdrel claimed this task.

I took a look and the checks were already adjusted in the following patch https://gerrit.wikimedia.org/r/c/mediawiki/extensions/OAuth/+/993162 (T355378).

Thanks for checking. In which case, I think we can close this task as the change to allow temporary accounts would probably be at a later stage and to be done in a new task.