App Login credentials not working
I am using nextcloud 18.0.6 and recently upgraded from 18.0.3.
The additional app passwords from security -> devices & sessions are not working. Passwords are generated over the "Create new app password" button.
I created a new app password, the android nextcloud app responds with incorrect credentials, same by using a browser and the app login.
The log says:
Info core Bruteforce attempt from “****” detected for action “login”.
Warning no app in context Login failed: **** (Remote IP: ****)
I cleared the database bruteforce attempt entry with my IP address, but at the first login attempt with the correct (generated) app login credentials, a new bruteforce attempt entry is created in the database and the login is rejected with "Wrong username or password. "
Update: Just tested on a nextcloud hoster with 18.0.6 (updated from 18.0.3), with the same problem!
Steps to reproduce
- maybe upgrade from18.0.3. to 18.0.6
- "Create new app password"
- Login with the generated password inside browser or android nextcloud app
Expected behaviour
Login successful.
Actual behaviour
Error Message "Wrong username or password. "
Server configuration
Debian buster
Web server: Apache 2.4.38-3+deb10u3
Database: MariaDB
PHP version: php 7.3
**Nextcloud version: 18.0.6
Updated from an older Nextcloud/ownCloud or fresh install: 18.0.3.
Where did you install Nextcloud from: https://nextcloud.com/install/ Signing status:
Signing status
Login as admin user into your Nextcloud and access
http://example.com/index.php/settings/integrity/failed
paste the results here.
No errors have been found.
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder
Enabled:
- accessibility: 1.4.0
- activity: 2.11.0
- admin_audit: 1.8.0
- calendar: 2.0.3
- cloud_federation_api: 1.1.0
- comments: 1.8.0
- contacts: 3.3.0
- dav: 1.14.0
- federatedfilesharing: 1.8.0
- files: 1.13.1
- files_pdfviewer: 1.7.0
- files_rightclick: 0.15.2
- files_trashbin: 1.8.0
- files_versions: 1.11.0
- files_videoplayer: 1.7.0
- firstrunwizard: 2.7.0
- logreader: 2.3.0
- lookup_server_connector: 1.6.0
- nextcloud_announcements: 1.7.0
- notes: 3.6.0
- notifications: 2.6.0
- oauth2: 1.6.0
- password_policy: 1.8.0
- photos: 1.0.0
- privacy: 1.2.0
- provisioning_api: 1.8.0
- recommendations: 0.6.0
- serverinfo: 1.8.0
- settings: 1.0.0
- sharebymail: 1.8.0
- support: 1.1.1
- survey_client: 1.6.0
- systemtags: 1.8.0
- text: 2.0.0
- theming: 1.9.0
- twofactor_backupcodes: 1.7.0
- updatenotification: 1.8.0
- viewer: 1.2.0
- workflowengine: 2.0.0
Disabled:
- encryption
- federation
- files_external
- files_sharing
- user_ldap
Nextcloud configuration:
Config report
If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder
{ "system": { "instanceid": "REMOVED SENSITIVE VALUE", "passwordsalt": "REMOVED SENSITIVE VALUE", "secret": "REMOVED SENSITIVE VALUE", "trusted_domains": [ "192.168..", ".de" ], "datadirectory": "REMOVED SENSITIVE VALUE", "overwrite.cli.url": "https://192.168..*/nextcloud", "dbtype": "mysql", "version": "18.0.6.0", "dbname": "REMOVED SENSITIVE VALUE", "dbhost": "REMOVED SENSITIVE VALUE", "dbtableprefix": "oc_", "dbuser": "REMOVED SENSITIVE VALUE", "dbpassword": "REMOVED SENSITIVE VALUE", "installed": true, "forcessl": true, "forceSSLforSubdomains": true, "loglevel": 0, "theme": "", "memcache.local": "\OC\Memcache\APCu", "maintenance": false, "updatechecker": false, "appstoreenabled": true, "trashbin_retention_obligation": "auto", "htaccess.RewriteBase": "/nextcloud", "mysql.utf8mb4": true, "updater.secret": "REMOVED SENSITIVE VALUE" } }
Same problem on 19.0.1, newly generated app passwords are no longer working.
Same problem on 18.0.7, debian buster with Apache 2.4 and PHP 7.3
I see the same thing here, errors in the log that I think are related look like this:
[no app in context] Warning: Login failed: nielsenb (Remote IP: 172.19.0.2)
POST /login
from 172.19.0.2 at 2020-08-18T21:23:35+00:00
I am running Nextcloud behind a reverse proxy with nginx to handle SSL. I managed to get things working by setting 'overwriteprotocol' => 'https' in config.php.
I see the same thing here, errors in the log that I think are related look like this:
[no app in context] Warning: Login failed: nielsenb (Remote IP: 172.19.0.2) POST /login from 172.19.0.2 at 2020-08-18T21:23:35+00:00I am running Nextcloud behind a reverse proxy with nginx to handle SSL. I managed to get things working by setting
'overwriteprotocol' => 'https'inconfig.php.
Thanks for your effort, I'll try your fix very soon!
I see the same thing here, errors in the log that I think are related look like this:
[no app in context] Warning: Login failed: nielsenb (Remote IP: 172.19.0.2) POST /login from 172.19.0.2 at 2020-08-18T21:23:35+00:00I am running Nextcloud behind a reverse proxy with nginx to handle SSL. I managed to get things working by setting
'overwriteprotocol' => 'https'inconfig.php.
Still login failed "Wrong username or password. " with app login. :/
@nielsenb-jf Sadly the workaround is not working here.
This should be higher priority as it's currently no longer possible to add new apps to the nextcloud account without revealing the main password.
I see the same thing here, errors in the log that I think are related look like this:
[no app in context] Warning: Login failed: nielsenb (Remote IP: 172.19.0.2) POST /login from 172.19.0.2 at 2020-08-18T21:23:35+00:00I am running Nextcloud behind a reverse proxy with nginx to handle SSL. I managed to get things working by setting
'overwriteprotocol' => 'https'inconfig.php.Still login failed "Wrong username or password. " with app login. :/
Same here. :/
Also fails for me, Nextcloud 19.0.2
https://<myDomain>.com/index.php/settings/integrity/failed
returns
No errors have been found.
Issue persists on Nextcloud 19.0.5.
... issue persists on Nextcloud 20.0.7.1
How is this possible?
'overwriteprotocol' => 'https' doesn't work for me either, since it was already configured like that.
Tested with our own server as well as public hoster; generating a new app-password and using it afterwards newer works. This is now actually a problem for our intended backup strategy, since all accounts require 2FA and this is hardly possible with nextcloud in a headless linux. It's concerning at least, to see that this kind of issue hasn't even been adressed yet.
I've had the same kind of issue after moving my native Nexcloud instance into Docker with the apache image (version 21.0.0.18). Using nginx in front to enable HTTPS was working fine for accessing though a browser but all my desktop and mobile clients were failing with the authentication, which of course triggered the bruteforce protection and made me crazy before I ended here. The addind of 'overwriteprotocol' => 'https' in the config.php solved the issue for me, also I have aligned the 'overwrite.cli.url' parameter with the vhost name of my https proxy (not sure it was needed).
I have the same issue. Adding 'overwriteprotocol' => 'https' does nothing. I have nextcloud snap installation in VM under proxy. System couldn't recognize generated app passwords. Creating new users are going well.
Addition after further investigation and tests.
- Generated passwords work for android and ios syncing app. Was using it via QR code.
- Generated passwords dont work for desktop syncing app. It opens browser windows where login with newly generated password fails.
The same issue: NC 20.0.9.
Authenticating an android NC client via QR of app password works. Granting access from android NC client to DAVx works.
However, manually copy & paste app password to DAVx or KeePass2Android fails with response "protocol=http/1.1, code=401,message=Unauthorized".
Old app passwords created in the past continue to work.
EDIT: using LDAP backend. NC username is name_surname, while LDAP allows for Name Surname, name_s or email.
Thank you for taking the time to report a bug! 👍
As this seems to be a setup issue I would like to ask you to raise your question in the forums: https://help.nextcloud.com If you wish support with setup issues from Nextcloud GmbH we offer this as part of the Nextcloud subscription. Learn more about this at https://nextcloud.com/enterprise/
@szaimen I fear this is not a setup issue. The app credentials do not work and above comments are just talking about work around which do not work, as I understood it
Maybe yes but in contrary app credentials work on my instance and other instances so there is probably something wrong with their setup...
@szaimen
This issue has already been discussed in the forum: https://help.nextcloud.com/t/app-password-not-working/87228
Only manual created app passwords are affected and I can not see a possible config issue. On my own instance and on my hosters instance (not administered by me) is this issue. A lot of other people here could reproduce this problem. Maybe not anyone notice this problem, because it is only at self created app passwords.
If you think some configuration can cause this issue, please give me an config example here or in the nextcloud forum, at could cause this specific failure. I would like to test this.
Same Issue on NC21.0.3 on Ubuntu 18LTS behind a nginx reverse Proxy. My old tokens still work, only newley created fail. Definitely an issue with nextcloud code.
Migration from NC 22.0 to NC 22.1.0: getting worse. NC 22.1.0 docker, behind nginx reverse Proxy
No logging ar all on Android App for all account, old or new created account. QR Code, Token, App Credential, or normal logging same behavior, return to login page without error.
Login perfect on firefox browser.