Cannot grant access

Hello,

I have a Nextcloud server running since some time now, everything working fine until two days ago.
As far as I can see, everything is working except the connection with the Nextcloud desktop app.
When I add a new account (I did that because I thought it could help me in my problem), the app send me to the login page, which is working, then the “Grant access” page, which does nothing. I can click on the “Grant access” button but it’s useless.
I’ve tried this process with Firefox, Chromium and Edge, nothing change. I’ve also tried on Debian and on Windows 10, same problem.

Nextcloud version : 17.0.1
OS : Debian Buster with some parts of Bullseye
Apache : 2.4.38
PHP : 7.3.11-1

I’ve check the access.log and error.log, nothing seems to be relevant to this problem.

Can someone help me?

1 Like

Ok, I think I have the solution.
When I’m on the “Grant access” page, my firefox consol says:
Content Security Policy: The page’s settings blocked the loading of a resource at http://cloud.vulgarisons.info/index.php/login/v2/grant (“form-action”).

The problem seems to be related to my new Haproxy installation.
I had to add overwriteprotocol => "https"

Thanks to Tiontion24 on #debian-facile for the help.

1 Like

Same issue here and your solution worked as well.
Should this reported as an issue or could it be some server misconfiguration?
http instead of https is uncommon!

If one is using a proxy before like ha proxy you usually have http between the proxy and the webserver. Thus creating a problem. You need to know how to configure that in that case. This is a configuration error and not an issue.

I didn’t use a proxy though…
And even I would have, which I do from time to time on Firefox: I tried different browsers, the same result with all of them. And surely I didn’t touch the windows proxy settings.

Same issue here with nextcloud inside a Docker and behind a nginx reverse-proxy. I’ve set 'overwriteprotocol' => 'https' but it doesn’t solve the issue.

I managed to login with windows desktop app with the old login system, but I can’t log into the macos app.

I have the same setup, and I’m having the same problem. If this is an nginx configuration error, does anyone have a suggestion as to what I need to change?

I got the same issue. Grant access button is not working. Only android client can connect. iOS win and linux all can not connect. Chrome console says that

Refused to send form data to ‘’ because it violates the following Content Security Policy directive: “form-action ‘self’”.

I have the same issue. On a company provided macbook on which I am not allowed to modify networking/proxy configuration, I’m completely blocked for the installation of the nextcloud client due to this.
IMHO this is a bug in the client, because there’s simply nothing happening when you press the button, no error message, nothing.

i 've got the same problem!
last time i used an older client to login but that doesn’t work anymore…

grant access is doing nothing…

server: 17.0.2
client: 2.6

i am using nextcloud as docker with letsencrypt companion docker and nginx reverse proxy docker

‘overwriteprotocol’ => ‘https’ does not help

please help us!

1 Like

Hello All,

to solve this issue you need to add ‘overwriteprotocol’ => ‘https’ in config/config.php in nextcloud, I tested and solving the issue, here the explaination

/**

  • When generating URLs, Nextcloud attempts to detect whether the server is
  • accessed via https or http. However, if Nextcloud is behind a proxy
  • and the proxy handles the https calls, Nextcloud would not know that
  • ssl is in use, which would result in incorrect URLs being generated.
  • Valid values are http and https.
    */
    ‘overwriteprotocol’ => ‘’,