nextcloud / twofactor_totp

🔑 Second factor TOTP (RFC 6238) provider for Nextcloud
https://apps.nextcloud.com/apps/twofactor_totp
GNU Affero General Public License v3.0
286 stars 58 forks source link

No application passwords needed for external apps? #1548

Closed marwenius closed 1 month ago

marwenius commented 1 month ago

Steps to reproduce

  1. Two-Factor TOTP Provider is activated
  2. User has secured their account using TOTP
  3. User can authenticate with external apps via their browser (tested with: Desktop and Android app)

Expected behaviour

According to the section Login with external apps, I would assume that authentication via the browser is not possible under all circumstances for any external app.

Actual behaviour

Users can authenticate themselves without application passwords via the browser using their username, password and TOTP.

Server configuration

Operating system: Linux 6.1.66 #1 SMP PREEMPT_DYNAMIC Fri Dec 8 20:52:09 CET 2023 x86_64

Web server: Apache (fpm-fcgi)

Database: mysql 10.11.6

PHP version: 8.1.28

Version: 29.0.4 - 29.0.4.1

Updated from an older version or fresh install: 29.0.2

List of activated apps:

Enabled:

Disabled:

Client configuration

Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0

Operating system: Windows 10 Pro

ChristophWurst commented 1 month ago

Did you go through Bildschirmfoto vom 2024-07-22 12-10-04 and Bildschirmfoto vom 2024-07-22 12-10-10 ?

marwenius commented 1 month ago

Yes, they went through this process. Is this to be expected?

ChristophWurst commented 1 month ago

Yes, that is expected. This means the user's active session was used to verify the login on another device.

If the users are logged out, they first have to log in and pass the 2FA page before they can grant access.

marwenius commented 1 month ago

Maybe I'm on the wrong track here, but then I find the statement in the readme confusing that application passwords are necessary when they are not?

Thanks for the quick response, by the way.

ChristophWurst commented 1 month ago

Right, some of this is outdated. The login flow that uses the browser session is only implemented in "official" Nextcloud apps. Other apps, e.g. Gnome Online Accounts, don't know this mechanism and they ask for a username and password. In those prompts you can not use the login password when 2FA is enabled. You will have to generate and use an app password.

Does this explain it better? I can update the readme.

marwenius commented 1 month ago

Yes, that explains it for me at least. And an update would certainly not be amiss if that were possible. Thank you very much!