Skip to content

fix(auth): allow email login with app password created via uid login - #66542

Draft
juliusknorr wants to merge 1 commit into
masterfrom
fix/email-login-app-password-uid-token
Draft

juliusknorr wants to merge 1 commit into
masterfrom
fix/email-login-app-password-uid-token

Conversation

@juliusknorr

@juliusknorr juliusknorr commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Summary

Clients logging in with the account's email and an app password are rejected with App token login name does not match when the app password was created after a login with the user id, which is common with SSO.

The token branch of logClientIn now accepts the email if it belongs to the token owner (case-insensitive) and the token's login name is the uid. It then logs in with the token's own login name, so all token checks still apply. Other login names stay strict, another user's email is rejected, and there's no getByEmail() lookup.

This also fixes the fallback returning true without logging in when an email token's credentials were outdated (503 instead of 401 in DAV).

Accepting the owner's email is safe: the check comes from owncloud/core#25154 to keep clients from using arbitrary names, and after a token login only the token's stored login name is used (session, LoginCredentials\Store, events).

TODO

  • Backport to stable33 (manual, test context differs)

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Clients logging in with the account's email address and an app password
created in a session with the user id (e.g. SSO) were rejected. Accept
the token owner's email when the token login name is the uid and log in
with the token's own login name. Also stops the fallback from reporting
a login that never happened when the token login name is the email.

Co-authored-by: Wouter Haffmans <wouter@simply-life.net>
Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Julius Knorr <jus@bitgrid.net>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: After upgrade, App token login name does not match

2 participants