When using KIO::MimeTypeFinderJob to determine the mimetype of a ftp URL requiring authentication (I don't know whether the same happens with other schemes) it doesn't display an authentication dialog, even if setAuthenticationPromptEnabled(true) has been called. Instead, the job always returns an error with error code of 1 and error string of "User canceled action". Removing line 131 in mimetypefinderjob.cpp allows the dialog to be displayed.
> Removing line 131 in mimetypefinderjob.cpp allows the dialog to be displayed. That makes a lot of sense. I wonder though why that was added in the first place
*** Bug 477352 has been marked as a duplicate of this bug. ***
I would also add that it would be great for sftp connection credentials to be re-used. When I restore a crashed session, I get a series of sftp authentication prompts for the same domain.. one for each window/view for the same sftp connection. If I don't type it in quickly enough, then the connection fails, and I am unable to connect to the server, even after a refresh of the view contents. I noticed recently that after a few days /some/ of the connections allow for another attempt to provide credential details.
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1572
Git commit 682b09c21553cd47230fb2c948a944a47ab0252e by Stefano Crocco. Committed on 29/03/2024 at 13:32. Pushed by stefanocrocco into branch 'master'. Fix authentication prompt not being shown Calling job->setUiDelegate(nullptr) prevents the authentication prompt from being displayed, even if it's been enabled M +0 -2 src/core/mimetypefinderjob.cpp https://invent.kde.org/frameworks/kio/-/commit/682b09c21553cd47230fb2c948a944a47ab0252e