You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe a false lead, but to add a bit of context for my case: I had Nextcloud 14.0.2 running and the latest iOS app at that time. I uninstalled the app for a few month without logging out.
I upgraded to Nextcloud 15.0.2 and then reinstalled the iOS app. I cannot log in since then, whether it is through my current user log-in or using "the old way". Creating an application password does not seem to solve the issue.
when I had my setup done for Nextcloud using docker-compose everything was running fine except for the authentication using the iOS app. Only "the old way" worked as described by you guys already. I used it in first place to get productive but then one of my friends i've shared a MP3 with came up with a screenshot where the embedded player of Nextcloud could not access the MP3.
I use Nextcloud behind an Nginx proxy using the jwilder/nginx docker image.
Then I had a closer look and I saw that my Nextcloud tried to access the MP3 via http but I set up https for my instance. So I read around and found a solution where I have to add the following properties to my config.php to enforce the usage of https and to use the correct base URL with https.
(replace the url with yours)
<?php
$CONFIG = array (
... (removed to save space)
'overwrite.cli.url' => 'https://home.secret-domain.com',
'overwriteprotocol' => 'https',
... (removed to save space)
After adding overwrite.cli.url and overwriteprotocol my MP3 could load via https without getting the error about violating the content security policy and also the "new" login works now on iOS. Also the app code authentication works fine now.
I hope it helps someone.
Reacted by alienp4nda, Benjamin Bouvier, tucknology, Ioannis Angelakopoulos, nshtg, derWeihnachtsmann, Sascha Scandella, Raymond Douglas, Simon Caron, Thomas and 41 more
Reacted by tucknology, Josua Hunziker, egeu5, Ioannis Angelakopoulos, derWeihnachtsmann, Bernd Arnold, Raymond Douglas, Simon Caron, Thomas, Emil Säll and 20 more
That makes sense, my initial thought was a missing http header not being sent to Nextcloud. I believe your solution would work except I’m running my Nextcloud server behind a reverse proxy that’s providing SSL/TLS. Unless I misunderstood you and you have yours behind a reverse proxy as well.
That makes sense, my initial thought was a missing http header not being sent to Nextcloud. I believe your solution would work except I’m running my Nextcloud server behind a reverse proxy that’s providing SSL/TLS. Unless I misunderstood you and you have yours behind a reverse proxy as well.
I will edit my comment, I am using Nextcloud behind nginx too. I use jwilder/nginx + letsencrypt companion and Nextcloud is behind the nginx proxy :)
The server-config solves the issue. So it is a server issue. I tested the solution from fluxx to and it is working on NC-App on Ipad and Talk-App on Ipad.
I have exactly the same issue since NC12 (meanwhile I'm at NC15), only the "old method" works for login. Even though this is a workaround, I'm a bit annoyed how long this bug is towed thru several NC versions.
fuxx's solution did not change anything for me (I'm running nginx as a reverse proxy as well).
And now the "bug" is gone with nginx to.
I did not found an entry in the manual. We should add an entry for using NC with a reverse proxy. Any suggestions where we should add it?
@fuxx You are a life-saver! The iOS App started working right after I applied your settings!
My Nextcloud sits behind an OPNsense Firewall with nginx plugin to proxy and to provide SSL.
Ok, seems this bug is closed but run into it, just to make sure someone else gets my situation and can help: I was using an Apache reverse proxy, which was masquerading the client IP. mod_rpaf lets Apache bypass client's IP to the real server, wich was to original problem.
And resinstalling nextcloud. I could see that there's 2 places where the basename of the domain is fixed, in config.php, but also inside the database (don't know where exactly but I found it with a simple grep that found my domain in the SQLite database). So maybe someone needs a more surgical solution may inspect into the tables to get where in the config there is the basename of the domain, and change it with an appropriate SQL sentence.
So i am having the same issue. Frankly I cannot add the overwrite parameter because I want to access nextcloud locally via local ip which will be overwritten to external domain when set. Any ideas?
For what it's worth, @fuxx solution did solve issues on my server as well, even though I'm using an Nginx reserve-proxy that provides TLS.
@fuxx
That makes sense, my initial thought was a missing http header not being sent to Nextcloud. I believe your solution would work except I’m running my Nextcloud server behind a reverse proxy that’s providing SSL/TLS. Unless I misunderstood you and you have yours behind a reverse proxy as well.
I will edit my comment, I am using Nextcloud behind nginx too. I use jwilder/nginx + letsencrypt companion and Nextcloud is behind the nginx proxy :)
Unfortunately @fuxx solution doesn't work for me. I have had both overwrite.cli.url and overwriteprotocol set for some time and logins are still failing. Inspecting the grant form the form url is set to http, not https. This on Nextcloud 20.0.6 behind Nginx rev proxy.
Activity
tucknology commentedon Jan 15, 2019
egeu5 commentedon Jan 19, 2019
I can confirm it.
WeirdCircumstances commentedon Jan 22, 2019
Me too, no login method is working. Same message for both
WeirdCircumstances commentedon Jan 22, 2019
At the bottom is a link to the old login method. It's working here, the issue is only in the new method
mko-x commentedon Jan 24, 2019
Failing with fresh installation - even old way doesn't work.
Revision: Old way does work, but only without 2FA.
bnjbvr commentedon Jan 26, 2019
Ditto here. Even the token way didn't work for me, with the same error. Is there any logs we could provide that would help?
mko-x commentedon Jan 26, 2019
And now login loop with linux client
AndrStnz commentedon Jan 30, 2019
Logs from the ngnix proxy and the nextcloud server could help :)
thibaultamartin commentedon Feb 1, 2019
Maybe a false lead, but to add a bit of context for my case: I had Nextcloud 14.0.2 running and the latest iOS app at that time. I uninstalled the app for a few month without logging out.
I upgraded to Nextcloud 15.0.2 and then reinstalled the iOS app. I cannot log in since then, whether it is through my current user log-in or using "the old way". Creating an application password does not seem to solve the issue.
fuxx commentedon Feb 1, 2019
Hey folks,
when I had my setup done for Nextcloud using docker-compose everything was running fine except for the authentication using the iOS app. Only "the old way" worked as described by you guys already. I used it in first place to get productive but then one of my friends i've shared a MP3 with came up with a screenshot where the embedded player of Nextcloud could not access the MP3.
I use Nextcloud behind an Nginx proxy using the jwilder/nginx docker image.
Then I had a closer look and I saw that my Nextcloud tried to access the MP3 via http but I set up https for my instance. So I read around and found a solution where I have to add the following properties to my config.php to enforce the usage of https and to use the correct base URL with https.
(replace the url with yours)
After adding
overwrite.cli.urlandoverwriteprotocolmy MP3 could load via https without getting the error about violating thecontent security policyand also the "new" login works now on iOS. Also the app code authentication works fine now.I hope it helps someone.
alienp4nda commentedon Feb 1, 2019
@fuxx
That makes sense, my initial thought was a missing http header not being sent to Nextcloud. I believe your solution would work except I’m running my Nextcloud server behind a reverse proxy that’s providing SSL/TLS. Unless I misunderstood you and you have yours behind a reverse proxy as well.
bnjbvr commentedon Feb 1, 2019
For what it's worth, @fuxx solution did solve issues on my server as well, even though I'm using an Nginx reserve-proxy that provides TLS.
[edit (forgot the most important)]: Thanks fuxx!
fuxx commentedon Feb 1, 2019
I will edit my comment, I am using Nextcloud behind nginx too. I use jwilder/nginx + letsencrypt companion and Nextcloud is behind the nginx proxy :)
alienp4nda commentedon Feb 1, 2019
Sweet, going to do that right now. I use the same proxy, greatly appreciate.
@fux if I could send you a box of cookies I would, it worked. I didn’t even have to add 443 as an exposed port to the docker container.
tucknology commentedon Feb 3, 2019
@fuxx Thanks that worked for me!
2 remaining items
markshep commentedon Feb 9, 2019
I'm getting this too, but can login fine from macOS, Windows and Android so isn't a server configuration problem. Why is this bug closed?
egeu5 commentedon Feb 9, 2019
The server-config solves the issue. So it is a server issue. I tested the solution from fluxx to and it is working on NC-App on Ipad and Talk-App on Ipad.
christianbumann commentedon Feb 19, 2019
@fuxx Thanks that also worked for me!
LittleNo commentedon Mar 11, 2019
I have exactly the same issue since NC12 (meanwhile I'm at NC15), only the "old method" works for login. Even though this is a workaround, I'm a bit annoyed how long this bug is towed thru several NC versions.
fuxx's solution did not change anything for me (I'm running nginx as a reverse proxy as well).
egeu5 commentedon Mar 11, 2019
@LittleNo Please post you're config.php and we will have a look ;-)
LittleNo commentedon Mar 11, 2019
thanks ;-)
LittleNo commentedon Mar 11, 2019
sorry, I had a typo in "overwriteprotocol" entry, and indeed it works for now 👍
egeu5 commentedon Mar 11, 2019
And now the "bug" is gone with nginx to.
I did not found an entry in the manual. We should add an entry for using NC with a reverse proxy. Any suggestions where we should add it?
Aurnytoraink commentedon Mar 15, 2019
Hey,
I know that this issue is closed but I get the same issue on my iPad. I used this docker-compose exemples
https://github.com/nextcloud/docker/tree/master/.examples/docker-compose/with-nginx-proxy/mariadb-cron-redis/apache
I tried to modify the redis.config.php but I still doesn't work
Thanks for your help
FastFelix771 commentedon Apr 8, 2019
@fuxx You are a life-saver! The iOS App started working right after I applied your settings!
My Nextcloud sits behind an OPNsense Firewall with nginx plugin to proxy and to provide SSL.
thomas126 commentedon May 30, 2019
Hey guys,
gut the same Problem. Cannot login normally nor via App Token. Any ideas why?
I tried the overwrite setting but I also want to access the nextcloud instance locally without https.
Running nextcloud in docker behind Traefik container.
emieza commentedon Jul 26, 2019
Ok, seems this bug is closed but run into it, just to make sure someone else gets my situation and can help: I was using an Apache reverse proxy, which was masquerading the client IP. mod_rpaf lets Apache bypass client's IP to the real server, wich was to original problem.
It finally got solved combining @fuxx arrangement plus activating the apache mod_rpaf , following this article: http://sysadminnotebook.blogspot.com/2014/07/preserving-client-ip-with-apache.html
And resinstalling nextcloud. I could see that there's 2 places where the basename of the domain is fixed, in config.php, but also inside the database (don't know where exactly but I found it with a simple grep that found my domain in the SQLite database). So maybe someone needs a more surgical solution may inspect into the tables to get where in the config there is the basename of the domain, and change it with an appropriate SQL sentence.
thomas126 commentedon Aug 30, 2019
So i am having the same issue. Frankly I cannot add the overwrite parameter because I want to access nextcloud locally via local ip which will be overwritten to external domain when set. Any ideas?
chueikan commentedon Oct 21, 2020
Great!! Thank you!!
ccellist commentedon Jun 7, 2021
Unfortunately @fuxx solution doesn't work for me. I have had both overwrite.cli.url and overwriteprotocol set for some time and logins are still failing. Inspecting the grant form the form url is set to http, not https. This on Nextcloud 20.0.6 behind Nginx rev proxy.