Page MenuHomePhabricator

Logout API doesn't work with OAuth
Closed, ResolvedPublic

Description

ApiLogout will error out when $session->canSetUser() is false. It's unclear whether that's a good thing. In MediaWiki core, action=logout means "log me out from this device" which doesn't make any sense for OAuth. But for CentralAuth, it means "log me out on all devices" (mostly because the user needs to be logged out from multiple domains, and scoping the session invalidation to the current device but all domains is hard), and it's that's a perfectly sensible functionality to call via OAuth.

So maybe we should differentiate between "local mode" and "global mode" in the API, and only do the session check in the first case.

Details

Related Changes in Gerrit:

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change #1292882 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/core@master] Allow global logout via action API

https://gerrit.wikimedia.org/r/1292882

Change #1292882 merged by jenkins-bot:

[mediawiki/core@master] Allow global logout via action API

https://gerrit.wikimedia.org/r/1292882