HTTP 401 when I try to grant access to Android client

I’ve set up an instance of nextcloud on a shared hosting environment. I can log on fine to the nextcloud instance from the browser.

I’ve installed the nextcloud app on Android. It asks for the server which I’ve provided:

https://nextcloud.unokay.com

Connection is fine.

Then it asks me to log on with user ID and password. This works fine.

Then it asks me to grant access:

When I do this, I get HTTP 401 error, and I am sent back to the log in page:

These are the access log entries showing the 401 error:

nextcloud.unokay.com +9qKsQpY+yOBqx+GgSLTkw - - [03/Jan/2021:12:38:27 +0000] "POST /index.php/login/flow HTTP/2.0" 303 - "-" "Motorola motorola one vision (Android)" {910:599,958885}
nextcloud.unokay.com +9qKsQpY+yOBqx+GgSLTkw - - [03/Jan/2021:12:38:29 +0000] "GET /status.php HTTP/1.1" 200 170 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.14.1" {1073:4060,349707}
nextcloud.unokay.com +9qKsQpY+yOBqx+GgSLTkw - - [03/Jan/2021:12:38:29 +0000] "HEAD /remote.php/webdav/ HTTP/1.1" 401 - "-" "Mozilla/5.0 (Android) Nextcloud-android/3.14.1" {155:1123,483111}
nextcloud.unokay.com +9qKsQpY+yOBqx+GgSLTkw - - [03/Jan/2021:12:38:30 +0000] "HEAD /remote.php/webdav/ HTTP/1.1" 401 - "-" "Mozilla/5.0 (Android) Nextcloud-android/3.14.1" {306:1123,416851}
nextcloud.unokay.com +9qKsQpY+yOBqx+GgSLTkw - - [03/Jan/2021:12:38:31 +0000] "GET /index.php/login/flow HTTP/2.0" 200 5037 "-" "Motorola motorola one vision (Android)" {66:5824,620786}

Any suggestions for what to do next?

Dom