Page MenuHomePhabricator

Document best practices for user login if user is using 2FA
Open, LowPublic

Description

It came up in T255344: Openrefine: problems logging in and has come up in T150582: Support two-factor authentication in AutoWikiBrowser...

We should document the best practices of user login for different types of applications and login flows, when a user is using 2FA on their account.

In some cases, OAuth can be used, but for cases where code is open source, and distributed in apps, we can't keep secrets secret. Owner only OAuth apps may work, but higher barrier to entry

BotPasswords generally work as a catch all solution

The API action=clientlogin does support taking OATHToken as a parameter (used by the Mobile Apps at least), but should we be encouraging this pattern? In open source applications it's a bit saner, but what about non open source apps

... I'm not sure it is worth the effort, nor that it is good security practice to train users to put their password and 2FA into random desktop apps they have downloaded from the internet.

Some example cases:

Event Timeline

Shouldn't OAuth 2 be usable for mobile apps / desktop tools as long as they are able to open an URL in the browser and to intercept certain return URL types? (And for pure-JS apps, too.)

Probably. Examples and description isn't exhaustive :)

Tagging CPT as they're the ones maintaining/authoring OAuth improvements, and had the WebAuthn extension developed etc.

Seems in the purview, along with API Gateway stuff too, this sort of documentation will be useful for those developers

@apaskulin This seems like some of the content we'll be covering in the Portal. I don't think the fallback to Action API mechanisms is the right way for us to go, but we should have information on how to use OAuth with Open Source and non-confidential clients.

We think this might be OATHAuth-related, so tagging it in here too.

As API Gateway is nowadays owned by serviceops, adding the serviceops project tag to open API Gateway tasks tagged with the deprecated/archived "Platform Team Initiatives (API Gateway)" tag at https://phabricator.wikimedia.org/project/profile/4321/, as part of Phabricator Housekeeping.