nextcloud / user_oidc

OIDC connect user backend for Nextcloud
GNU Affero General Public License v3.0
90 stars 36 forks source link

Could not update the provider: The discovery endpoint is not reachable. #803

Open Snuffy2 opened 9 months ago

Snuffy2 commented 9 months ago

I'm not sure where the issue is but I'm unable to get this working. I'm using Authentik for OIDC.

The Configuration URL appears to be correct since when I open it in a browser it is loading this (domain name replaced): openid-configuration.json

I've triple checked the Config Id and Secret are correct and even removed and regenerated new ones in Authentik to be sure.

Happy to provide any other logs or try anything else suggested.

tugdualenligne commented 8 months ago

Same issue here. Authentik version 2024.2.2 and Nextcloud 28.0.2

abjoseph commented 8 months ago

Same issue here as well. Authentik version 2024.2.2 and Nextcloud 27.1.3

julien-nc commented 8 months ago

You can check if you see Discovery endpoint validation error in the nextcloud server logs. These lines should contain more information about why the discovery endpoint can't be reached.

If there is no such line, it most likely means the network request from NC to the discovery endpoint failed. I could give you a patch to get more information about that in the logs.

abjoseph commented 8 months ago

@julien-nc I found this comment and after applying the same setting, it resolved the error reported by OP. Not saying it's the resolution for OP but it worked for me. Maybe something that should be documented in the main README.

CC: https://github.com/nextcloud/user_oidc/issues/555

tugdualenligne commented 8 months ago

Thanks I’ve got this setting already in my config.php file and it doesn’t resolve my issue

Le ven. 29 mars 2024 à 22:52, Brandon Joseph @.***> a écrit :

@julien-nc https://github.com/julien-nc I found this comment https://github.com/nextcloud/user_oidc/issues/555#issuecomment-1379674153 and after applying the same setting, it resolved the error reported by OP. Not saying it's the resolution for OP but it worked for me. Maybe something that should be documented in the main README.

— Reply to this email directly, view it on GitHub https://github.com/nextcloud/user_oidc/issues/803#issuecomment-2027769614, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD5OO4XP2BKV5JY5EWTXMPLY2XPBLAVCNFSM6AAAAABEA76O4CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRXG43DSNRRGQ . You are receiving this because you commented.Message ID: @.***>

4sens commented 2 months ago

Having the same issue here. Any updates?

edward-ly commented 1 month ago

Hi, if anyone can report whether the issue still persists on the latest versions of Authentik/Nextcloud/user_oidc and provide some reproducible steps if so, that would be greatly appreciated. We'll take a look if the issue is confirmed to be on our end.

Paco93 commented 1 month ago

Having the same issue here. I am on latest versions of Authentik/Nextcloud/user_oidc. Logging says:

Error | user_oidc | LocalServerExceptionHost "192.168.1.230" (xx.xx.xx.xx:80) violates local access rulesDiscovery endpoint validation error

I added in config.php 'allow_local_remote_servers' => 'true' but no success.

edward-ly commented 1 month ago

If you're running Nextcloud/Authentik inside Docker, it's possible that local IP addresses aren't being recognized correctly from within the container. Try running ip a and using one of the IP addresses listed that is assigned to Docker instead for all containers.

Anyway, I'm not sure if I still have enough information, will investigate further.

Paco93 commented 1 month ago

Yes I am running nextcloud/authentik under docker but on different machines (actually different lxc containers) and with a proxy manager (NPM) on another machine on my lan. However I don't think the issue is with docker networking. In fact I can successufully download the json file at the Discovery endpoint from within the nextcloud container via wget. I suspect the issue is rather with nextcloud config .