Refining 2FA login flow (remember browser/device trust upon logout)
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
How to use GitHub
- Please use the 👍 reaction to show that you are interested into the same feature.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
I searched https://github.com/nextcloud/server issues for "is:issue is:open 2fa default" and did not find anything related, so…:
Situation
When logged out, a user always has to do a 2FA login if 2FA is active for his account.
Considerations
For many threat scenarios, it seems to be sufficient to remember the browser/device and only log out the user.
Related to https://github.com/nextcloud/server/issues/34403
Implications
The state "authenticated" is kind of split up in two components: "USER is authenticated" plus "BROWSER/DEVICE is trusted". At first sight, this does need UI changes in the server only.
Proposal
In the login screen, the user should be able to
a) log in using primary method – and opt-in to be remembered AS USER
b) be challenged with the second factor method – and be able to opt-in to be remembered AS BROWSER/DEVICE
When logged in, the user should be able to
a) log out AS USER without losing the trust for this browser/device
b) clear the trust for this BROWSER/DEVICE
Amazon does is that way, and I thing it's very appealing. They seem to have two tokens: One for the user login credentials (username/password) and one for the second factor (TOTP in that case). One may log out (e.g. to make sure no other family member uses it) without the need to re-enter the 2nd factor upon re-login.
Notes
This is a starting point for a (focussed) discussion. Please challenge or enhance the proposal by pointing out what needs to be taken into consideration.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue does not name any files, tests, or entry points to inspect. Begin by reviewing the existing 2FA login, logout, and trusted-device behavior; the proposal is done only after the scope, trust-token behavior, UI, and security implications are defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- authentication, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100