Cannot authenticate with app password in Nextcloud account / regular password works


  • Hi,

    thanks for the swift reply.

    @rfc2822

    it’s probably not the right username (email vs user name?)/app password (extra space in copy/paste? revoked by mistake?), and/or there is a server error.

    I’m sure all the credentials were correct since I did a direct copy-and-paste from the web-interface and also double checked them.

    Especially confusing was the fact that when swapping the app password for the regular one made all the difference and the account was created as expected.

    It all came down to the app specific password not being accepted.

    you can also install the Nextcloud app and then use Login flow to generate/use the app password automatically. Does that work?

    Well, I did that and it worked out fine.
    I removed the account in the Nextcloud app and also revoked access for it in the web interface but kept the DAVx5 account.
    This still works fine.

    Here where it gets weird: trying to create an account as before, i. e. using an app password, now also works. 😮

    I cannot say what “blockage” using the Nextcloud Login flow freed up but everything seems to be in working order now.
    I’ll keep an eye on it, though.

    Thank you for you assistance.

  • developer

    I see. Well I don’t know what was wrong but because it now works as expected, I’ll mark this as solved 🙂


  • Sorry to reply to an old thread, but I have similar problems. I’m using Davx5 with NC with 2fa configured, I added app passwords for Davx5. It works at first for several days, but after some time (not sure how long now) I start to see the same errors as in original post. I’m not sure if it’s a problem of Davx5 or NC? Thanks for any info.

  • developer

    @mehturt I have seen some reports in the Nextcloud tracker about that, please follow up there. If there is any indication that it could be related to DAVx5, please post here. At the moment, I don’t see such an indication.


  • @rfc2822 Thank you, the indication may be the text in the NC log:
    “No ‘Authorization: Bearer’ header found. Either the client didn’t send one, or …”
    Is there any way to mimic the HTTP request that Davdroid is sending towards the NC server using command line tools (using app password)? That way I could rule out a Davdroid issue. Thanks.

  • developer

    @mehturt said in Cannot authenticate with app password in Nextcloud account / regular password works:

    @rfc2822 Thank you, the indication may be the text in the NC log:
    “No ‘Authorization: Bearer’ header found. Either the client didn’t send one, or …”

    This message doesn’t matter. DAVx5 uses Basic authorization, not Bearer.

    Is there any way to mimic the HTTP request that Davdroid is sending towards the NC server using command line tools (using app password)? That way I could rule out a Davdroid issue. Thanks.

    It’s simple plain-text authorization, you can use curl -u username:password -vX PROPFIND <url> with the same username and password as you enter in DAVx5.

    As said above, I’m pretty sure that this is not a DAVx5 problem. Did you have a look at the corresponding Nextcloud issues?


  • @rfc2822 so I found some NC tickets, e.g.
    https://github.com/nextcloud/server/issues/19515
    https://github.com/nextcloud/server/issues/19408
    you did not list any, so I’m not sure if you found something else or not…
    Regarding the curl test, I forgot that if I did not put down the app password, I cannot retrieve it via the NC UI, I can only generate a new one (and then update it in Davx5 but I bet it will start working again).

  • developer

    @mehturt Then I suggest to get a new password, note it, check with curl and use it for DAVx5. Then when it doesn’t work anymore, check with curl again.


  • @rfc2822 yes, thanks, that’s exactly what I’ll do. Btw is it possible (or will it be possible) to use the QR code to enter the password to Davx5? Typing it each time is kind of error prone. I usually generate the password on my PC and then I need to type it manually to the Android phone.

  • developer

    @mehturt No, but I usually send it to myself with a messenger (or email or whatever).

Similar topics