Force app password for nextcloud desktop

Hi

How can I force Nextcloud desktop client to use an app password instead of the oauth webpage login flow to authenticate against my instance?

Best Regards
d-fens

There should be a link called “Alternative Login via App Password” or similar below the “Login” button in the browser window.

See here… Desktop client app password - #2 by bb77

Wich one? MacOS? Linux? IOS?

MacOS Client

But this still uses the browser, right? Can I somehow only use basic auth in Desktop Client?

As far as I know, no. The login procedure always opens the browser, where you then can log in either via Login Flow or by using a manually generated app password.

May I ask why you want to log in differently? I get the feeling that there is another underlying issue that needs to be resolved rather than trying to work around it.

Sure. Yes you are right, it is another underlying issue.
Basically, I’m in a network with a SSL-interception proxy that in some cases removes the Authorization header. Together with the behavior of Nextcloud client this means that the first connection to Nextlcoud is unauthorized and therefore Nextcloud client forgets the credential and I need to re-login using the browser.

This means that I get a new entry in “/index.php/settings/user/security” for every day that I first start Nextcloud.

With Owncloud I could force the use of Basic Auth (no oauth) and could just re-enter the password in the client which was “nicer” from an UX perspective.

I know that this is something that should be fixed on the proxy, but I can’t influence that.

I’m not 100% sure, but I don’t think there’s an option like that, at least not in the more recent versions of the Nextcloud desktop client.

You could try using an older version of the client from before Login Flow v2 was introduced. Or, you could try using the OwnCloud client with the “Force Basic Auth” flag you mentioned. However, for security reasons, neither of these options are advisable, nor is forcing it on the current version of the Nextcloud client, if possible at all.

You may try FolderSync instead of Nextcloud MacOS Client. I do not use MacOS, so not sure how FolderSync behaves on MacOS. I do use it with Android and my Nextcloud is protected with 2FA (TOTP). With TOTP installed on Nextcloud-Server the is an Option to create App specific Passwords. FolderSync on my Android-Devices do use this App specific Passwords and no login via Browser is needed.

Since i do not use MacOS, but only Linux on my other devices beside Android, i can’t tell you how FolderSync behaves on MacOS. But it might be good to give FolderSync a chance. There is a Trial-Download available.