You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading to the latest AIO, we get a "App token login name does not match" error. We also disabled talk while doing the upgrade, which had been previously enabled.
Steps to reproduce
1.Upgrade to latest AIO
2.
3.
Expected behavior
Previous app passwords would work
Installation method
Official All-in-One appliance
Nextcloud Server version
27
Operating system
None
PHP engine version
None
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Default user-backend (database)
LDAP/ Active Directory
SSO - SAML
Other
Configuration report
No response
List of activated Apps
No response
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response
The text was updated successfully, but these errors were encountered:
szaimen
changed the title
[Bug]: After upgrade to latest AIO, App token login name does not match
[Bug]: After upgrade, App token login name does not match
Mar 12, 2024
I encounter this issue in Nextcloud server 28.0.3. In my situation the Nextcloud Android app kept logging me out as soon as I logged in through the web flow. Based on the logs, the created login token uses my UID as username, but the session gets tied to the e-mail address. Even when logging into the app with the UID as username, this kept failing. I did not reset the app completely to see if that works, but it did all work fine until the server upgrade to 28.0.3. The log shows two "App token login name does not match" (with identical context data) and one "Login failed" message every time the app attempted to log in.
I could find commit 0e3f680 (7f2fdd8 in NC 29), which seems at least related; I'm not entirely sure if this one causes this bug or not.
Looking at that patch, the call made to validateTokenLoginName seems to check if the e-mail of the token's user matches the token's loginName. It looks like this is called with the e-mail address twice, while the token contains the UID/Username.
I modified validateTokenLoginName(?string $loginName, IToken $token) to this:
This makes tokens valid if the passed $loginName is either the loginName of the e-mail address of the token's user. That also seems to solve the TODO currently marked in that function.
I'm not certain if this is the correct approach to solving this, but after making this change I no longer get errors in the Android app or the server logs.
Bug description
After upgrading to the latest AIO, we get a "App token login name does not match" error. We also disabled talk while doing the upgrade, which had been previously enabled.
Steps to reproduce
1.Upgrade to latest AIO
2.
3.
Expected behavior
Previous app passwords would work
Installation method
Official All-in-One appliance
Nextcloud Server version
27
Operating system
None
PHP engine version
None
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
No response
List of activated Apps
No response
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response
The text was updated successfully, but these errors were encountered: