Logging in with app passwords also does not work.
- Create app password at index.php/user/security in web browser
- It shows:
- Login:
test
- Password:
HQmTE-DGQQR-aTzES-xxrbt-FX9Zf
- QR code with encoded string:
nc://login/user:test&password:HQmTE-DGQQR-aTzES-xxrbt-FX9Zf&server:http://zubat.local:8083/nextcloud
- Scan QR code with iOS app
- App shows “Current user is not logged in”
Server 31.0.0 beta 5, iOS client 6.2.3
Full request:
GET /nextcloud/ocs/v2.php/cloud/user HTTP/1.1
Host: zubat.local:8083
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: br;q=1.0, gzip;q=0.9, deflate;q=0.8
Connection: keep-alive
Accept: application/json
User-Agent: Mozilla/5.0 (iOS) Nextcloud-iOS/6.2.3
Authorization: Basic dGVzdDpIUW1URS1ER1FRUi1hVHpFUy14eHJidC1GWDlaZg==
OCS-APIRequest: true
Accept-Language: en-RU;q=1.0, ru-RU;q=0.9
HTTP/1.1 401 Unauthorized
Date: Wed, 22 Jan 2025 09:19:36 GMT
Server: Apache/2.4.62 (Unix) mod_fcgid/2.3.9
X-Powered-By: PHP/8.3.15
Referrer-Policy: no-referrer
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-XSS-Protection: 1; mode=block
X-Request-Id: XbPRAq5rhBpCt2nlM9Ng
Cache-Control: no-cache, no-store, must-revalidate
Content-Security-Policy: default-src 'none';base-uri 'none';manifest-src 'self';frame-ancestors 'none'
Feature-Policy: autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone 'none';payment 'none'
X-Robots-Tag: noindex, nofollow
Set-Cookie: oc_sessionPassphrase=yXiExRghElCGdSCpndM3eSNgc6ahvohyDpqGr1QSIoRoYWTkrDGTd%2BWa3HSwy6MgqEX3k1tijLGK%2BIr80gmHtdHCShqdnfgJQ84czEq8v3JBZ5ejtMNFtS0pvbQmPgNs; path=/nextcloud; HttpOnly; SameSite=Lax
Set-Cookie: nc_sameSiteCookielax=true; path=/nextcloud; httponly;expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax
Set-Cookie: nc_sameSiteCookiestrict=true; path=/nextcloud; httponly;expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=strict
Set-Cookie: ocgqsrv0aj8b=slim93tc9vf78841npg7dpmgr0; path=/nextcloud; HttpOnly; SameSite=Lax
Content-Length: 106
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: application/json; charset=utf-8
{"ocs":{"meta":{"status":"failure","statuscode":997,"message":"Current user is not logged in"},"data":[]}}
But authenticating with the same app password in webdav works:
PROPFIND /nextcloud/remote.php/dav/files/test/ HTTP/1.1
User-Agent: cadaver/0.26 neon/0.34.0
Connection: TE
TE: trailers
Host: zubat.local:8083
Depth: 1
Content-Length: 288
Content-Type: application/xml
Authorization: Basic dGVzdDpIUW1URS1ER1FRUi1hVHpFUy14eHJidC1GWDlaZg==
<?xml version="1.0" encoding="utf-8"?>
<propfind xmlns="DAV:"><prop>
<getcontentlength xmlns="DAV:"/>
<getlastmodified xmlns="DAV:"/>
<executable xmlns="http://apache.org/dav/props/"/>
<resourcetype xmlns="DAV:"/>
<checked-in xmlns="DAV:"/>
<checked-out xmlns="DAV:"/>
</prop></propfind>
HTTP/1.1 207 Multi-Status
Date: Wed, 22 Jan 2025 09:46:29 GMT
Server: Apache/2.4.62 (Unix) mod_fcgid/2.3.9
X-Powered-By: PHP/8.3.15
Referrer-Policy: no-referrer
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-Robots-Tag: noindex, nofollow
X-XSS-Protection: 1; mode=block
Content-Security-Policy: default-src 'none';
Vary: Brief,Prefer
DAV: 1, 3, extended-mkcol, access-control, calendarserver-principal-property-search, nc-paginate, nextcloud-checksum-update, nc-calendar-search, nc-enable-birthday-calendar
X-Request-Id: jaNsGYXnjmJyWaWnTbtf
X-Debug-Token: jaNsGYXnjmJyWaWnTbtf
Set-Cookie: oc_sessionPassphrase=%2FURk1%2FEtF3f8OGGeWkP5pV1UHTyeQhkGImlhyxF3gXvj00RFpZPesehQr429qKGQBrbCeCbxyhxJoPAYt0bszv5DBXVpbZlOAZsjSGAfVU85hHfHiUPHLOgxOWUg7%2FW1; path=/nextcloud; HttpOnly; SameSite=Lax
Set-Cookie: nc_sameSiteCookielax=true; path=/nextcloud; httponly;expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax
Set-Cookie: nc_sameSiteCookiestrict=true; path=/nextcloud; httponly;expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=strict
Set-Cookie: ocgqsrv0aj8b=fvneq6n3vvfpcjin90dolip2b7; path=/nextcloud; HttpOnly; SameSite=Lax
Transfer-Encoding: chunked
Content-Type: application/xml; charset=utf-8
<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns"><d:response><d:href>/nextcloud/remote.php/dav/files/test/</d:href><d:propstat><d:prop><d:getlastmodified>Wed, 22 Jan 2025 09:13:07 GMT</d:getlastmodified><d:resourcetype><d:collection/></d:resourcetype></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><d:getcontentlength/><x1:executable xmlns:x1="http://apache.org/dav/props/"/><d:checked-in/><d:checked-out/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/nextcloud/remote.php/dav/files/test/Documents/</d:href><d:propstat><d:prop><d:getlastmodified>Wed, 22 Jan 2025 09:13:05 GMT</d:getlastmodified><d:resourcetype><d:collection/></d:resourcetype></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><d:getcontentlength/><x1:executable xmlns:x1="http://apache.org/dav/props/"/><d:checked-in/><d:checked-out/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/nextcloud/remote.php/dav/files/test/Nextcloud%20Manual.pdf</d:href><d:propstat><d:prop><d:getcontentlength>12975698</d:getcontentlength><d:getlastmodified>Wed, 22 Jan 2025 09:13:05 GMT</d:getlastmodified><d:resourcetype/></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><x1:executable xmlns:x1="http://apache.org/dav/props/"/><d:checked-in/><d:checked-out/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/nextcloud/remote.php/dav/files/test/Nextcloud%20intro.mp4</d:href><d:propstat><d:prop><d:getcontentlength>3963036</d:getcontentlength><d:getlastmodified>Wed, 22 Jan 2025 09:13:06 GMT</d:getlastmodified><d:resourcetype/></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><x1:executable xmlns:x1="http://apache.org/dav/props/"/><d:checked-in/><d:checked-out/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/nextcloud/remote.php/dav/files/test/Nextcloud.png</d:href><d:propstat><d:prop><d:getcontentlength>50598</d:getcontentlength><d:getlastmodified>Wed, 22 Jan 2025 09:13:05 GMT</d:getlastmodified><d:resourcetype/></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><x1:executable xmlns:x1="http://apache.org/dav/props/"/><d:checked-in/><d:checked-out/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/nextcloud/remote.php/dav/files/test/Photos/</d:href><d:propstat><d:prop><d:getlastmodified>Wed, 22 Jan 2025 09:13:07 GMT</d:getlastmodified><d:resourcetype><d:collection/></d:resourcetype></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><d:getcontentlength/><x1:executable xmlns:x1="http://apache.org/dav/props/"/><d:checked-in/><d:checked-out/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/nextcloud/remote.php/dav/files/test/Readme.md</d:href><d:propstat><d:prop><d:getcontentlength>197</d:getcontentlength><d:getlastmodified>Wed, 22 Jan 2025 09:13:06 GMT</d:getlastmodified><d:resourcetype/></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><x1:executable xmlns:x1="http://apache.org/dav/props/"/><d:checked-in/><d:checked-out/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/nextcloud/remote.php/dav/files/test/Reasons%20to%20use%20Nextcloud.pdf</d:href><d:propstat><d:prop><d:getcontentlength>976625</d:getcontentlength><d:getlastmodified>Wed, 22 Jan 2025 09:13:06 GMT</d:getlastmodified><d:resourcetype/></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><x1:executable xmlns:x1="http://apache.org/dav/props/"/><d:checked-in/><d:checked-out/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/nextcloud/remote.php/dav/files/test/Templates/</d:href><d:propstat><d:prop><d:getlastmodified>Wed, 22 Jan 2025 09:13:06 GMT</d:getlastmodified><d:resourcetype><d:collection/></d:resourcetype></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><d:getcontentlength/><x1:executable xmlns:x1="http://apache.org/dav/props/"/><d:checked-in/><d:checked-out/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/nextcloud/remote.php/dav/files/test/Templates%20credits.md</d:href><d:propstat><d:prop><d:getcontentlength>2403</d:getcontentlength><d:getlastmodified>Wed, 22 Jan 2025 09:13:06 GMT</d:getlastmodified><d:resourcetype/></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><x1:executable xmlns:x1="http://apache.org/dav/props/"/><d:checked-in/><d:checked-out/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response></d:multistatus>
I see files in webdav client. Note that Authorization header value is the same in webdav and OCS v2 endpoint used by the Nextcloud iOS app.