Page MenuHomePhabricator

Use OAuth rather than password-based login for Wikimedia mobile apps
Open, HighPublic

Description

OAuth 2 makes it possible to have mobile apps authenticate without login (there was no secure way to do this with OAuth 1 so in the past requests like T179519: Implementing OAuth in Wikimedia Commons Android app have been rejected). Having the apps use that rather than password-based login would have several advantages:

  • They would be able to use a mechanism that's guaranteed to be stable, rather than adapting to changes in the interactive authentication flow. That would reduce maintenance burden on both app maintainers and authentication system maintainers.
  • There would be no need to enter the password on the app so there would be no way to steal it that way (e.g. on a rooted phone taken over by a malicious app).
  • OAuth provides a granular permission model, so even if some malicious app on the phone could access OAuth credentials, the abuse potential would be very limited.

This would require some work on both sides, but not that much, I think:

  • Apps would have to implement OAuth 2, but there are tons of libraries to help with that. They would have to rely on a web view for the OAuth authorization dialog, and the user would have to log in in the web view at that point - not great for UX and security, but doesn't take any effort to implement. In the long term, maybe it can be avoided by some kind of challenge-response thing.
  • In the OAuth extension, we'd want to add some sort of "internal app" where the scopes etc. can be changed without having to register a new app ID / secret, as those would have to be hardcoded in the app. And maybe suppress change tags.

Related Objects

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Seddon triaged this task as Low priority.Jun 3 2025, 4:21 PM

Users who are not using 2FA may get scary emails when the Wikimedia apps try but fail to re-login in the background using the previously entered password.

The email contains a link to a page with the following content: "Unlike e.g. password reset emails, there is no way for someone to send you a code without knowing your password. If that someone wasn't you, that means your password was somehow stolen or guessed. You should change it as soon as possible, and consider setting up two-factor authentication if available." https://www.mediawiki.org/wiki/Help:Extension:EmailAuth

OWresch-WMF raised the priority of this task from Low to High.
OWresch-WMF moved this task from OKR Work to Next on the MediaWiki-Platform-Team (Kanban Board) board.

Iny my opinion T412542: Rethink protocol support for OAuth apps should be added to the subtasks. Non-WMF mobile apps have to use the registration-form at https://meta.wikimedia.org/wiki/Special:OAuthConsumerRegistration/propose to use OAuth2. But that registration form doesn't allow custom uri-schemes currently, which are required for OAuth to work with mobile apps.