Page MenuHomePhabricator

OATH (2FA) needs an option to remember device but not keep user logged in
Open, Needs TriagePublic

Description

In the current implementation of two-factor authentication (OATH, 2FA), if a user has 2FA enabled, every time they log in they need to generate a token, regardless of whether the device is known to the server or not.

The only way to avoid needing a token every time is to keep the user logged in, which creates a perverse incentive that reduces security.

There should be an option to add a device as a trusted device but not keep the user logged in, so that a user can log out and log back in using password only. This would be useful for e.g. home and workspace computers, where other human beings may have physical access to the same device, but the combination of the device and the password can be deemed sufficient to authenticate a user.

Event Timeline

There may be situations where the user connects in a semi-trusted device and don’t want to let some secondary authentication token, e.g. when s/he uses a public library computer or a colleague’s computer. For instance it happened to me recently during a editathon where I had to use a public library computer (the WiFi was too secure and not available to visitors). Of course, a private browsing is preferable in this situation, when available.

If such a feature is implemented with a secondary token saved during the login process, there should be a way to discard it:

  • either with a checkbox when entering the TOTP code (opt-in or opt-out to be decided),
  • either with a "hard logout" to clear all tokens during logout.

Another process would be a button in the preferences to voluntarily declare the current device as trusted.

@Seb35 I agree. The implementation of "trusted" devices should include an
option to remove a trusted device. Thank you for listing out how the
feature can be implemented.