NextCloud 16.0.3 Server, Linux Client for Disco Dingo 2.5.2 -- login "grant" loop

Nextcloud version (eg, 12.0.2): 16.0.3
Operating system and version (eg, Ubuntu 17.04): Ubuntu 18.04.02 LTS (server), Ubuntu 19.04 (client)
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.29
PHP version (eg, 7.1): 7.2

If I attempt to use the Linux sync client from my Ubuntu 19.04 laptop, I get as far as putting in my login credentials, after which I get the “grant permissions?” button. If I press that it takes me immediately back to the login without syncing or creating the account connection in the client.

See instructions above to replicate.

The output of your Nextcloud log in Admin > Logging:

There isn't anything associated with the login attempt, not even informational. Instead from a few minutes ago it has a mild complaint about my avatar:
![image|690x296](upload://8pOpIrRSvjU5MI0vAmX5Mz6nLGw.png) 

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

root@tauron3:/var/www/html/config# cat config.php
<?php
$CONFIG = array (
  'instanceid' => 'things',
  'passwordsalt' => 'stuff',
  'secret' => 'more things',
  'trusted_domains' => 
  array (
    0 => 'tauron3.rtech.rti',
    1 => 'public.domain',
    2 => '192.168.9.23',
  ),
  'datadirectory' => '/srv/data',
  'dbtype' => 'mysql',
  'version' => '16.0.3.0',
  'overwrite.cli.url' => 'http://tauron3.rtech.rti',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nc_user',
  'dbpassword' => 'hunter2',
  'installed' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
    'timeout' => 3,
  ),
  'mysql.utf8mb4' => true,
  'maintenance' => false,
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
);

The output of your Apache/nginx/system log in /var/log/____:

Last few bits of the Apache access log here. There wasn't really anything in the error log.

192.168.9.29 - - [11/Jul/2019:05:20:32 +0000] "GET /apps/notifications/img/notifications-new.svg HTTP/1.0" 304 177 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:67.0) Gecko/20100101 Firefox/67.0"
192.168.9.29 - jtd [11/Jul/2019:05:20:33 +0000] "PROPFIND /remote.php/webdav/ HTTP/1.0" 207 958 "-" "Mozilla/5.0 (Macintosh) mirall/2.2.3 (build 4) (Nextcloud)"
192.168.9.29 - - [11/Jul/2019:05:20:35 +0000] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.0" 200 1184 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
192.168.9.29 - - [11/Jul/2019:05:20:35 +0000] "GET /apps/notifications/img/notifications-new.svg HTTP/1.0" 304 177 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
192.168.9.29 - - [11/Jul/2019:05:20:32 +0000] "GET /index.php/apps/logreader/poll?lastReqId=4CUooEoeT6D02wZAq9u2 HTTP/1.0" 200 885 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:67.0) Gecko/20100101 Firefox/67.0"
192.168.9.29 - - [11/Jul/2019:05:21:01 +0000] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.0" 200 1184 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36"
192.168.9.29 - - [11/Jul/2019:05:21:02 +0000] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.0" 200 1968 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:67.0) Gecko/20100101 Firefox/67.0"
192.168.9.29 - - [11/Jul/2019:05:21:02 +0000] "GET /apps/notifications/img/notifications-new.svg HTTP/1.0" 304 177 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:67.0) Gecko/20100101 Firefox/67.0"
192.168.9.29 - jtd [11/Jul/2019:05:21:03 +0000] "PROPFIND /remote.php/webdav/ HTTP/1.0" 207 958 "-" "Mozilla/5.0 (Macintosh) mirall/2.2.3 (build 4) (Nextcloud)"
192.168.9.29 - - [11/Jul/2019:05:21:05 +0000] "GET /index.php/csrftoken HTTP/1.0" 200 987 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
192.168.9.29 - - [11/Jul/2019:05:21:06 +0000] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.0" 200 1184 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
192.168.9.29 - - [11/Jul/2019:05:21:06 +0000] "GET /apps/notifications/img/notifications-new.svg HTTP/1.0" 304 177 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
192.168.9.29 - - [11/Jul/2019:05:20:52 +0000] "GET /index.php/apps/logreader/poll?lastReqId=4CUooEoeT6D02wZAq9u2 HTTP/1.0" 200 885 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:67.0) Gecko/20100101 Firefox/67.0"

This was solved by following the steps here: Stuck in a login loop when logging in from sync client on Linux

Basically I kept making those changes to the NC config file until things started working. I’m behind an NGINX proxy so those proxy settings may have been what helped.