zorn-v / nextcloud-social-login

GNU Affero General Public License v3.0
199 stars 138 forks source link

Unable to exchange code for API access token #291

Closed SDAdham closed 3 years ago

SDAdham commented 3 years ago

I am getting the same error Unable to exchange code for API access token. HTTP client error: Connection timed out after 30000 milliseconds. as this issue https://github.com/zorn-v/nextcloud-social-login/issues/172

I'm on Gitlab and I am using "Custom OpenID Connect" from "Social Login" and we don't have network problems, but it is on cPanel and gitlab is outside cPanel

Can you please help?

zorn-v commented 3 years ago

Try to increase timeout изображение

SDAdham commented 3 years ago

@zorn-v , where is this file?

SDAdham commented 3 years ago

I did edit config/config.php, however now i get:

Unable to exchange code for API access token. HTTP client error: Connection timed out after 45000 milliseconds
zorn-v commented 3 years ago

Global nextcloud config located in config/config.php

zorn-v commented 3 years ago

I did edit config/config.php, however now i get

Try to increase more. And check all urls for correctness

SDAdham commented 3 years ago

I did more and still the same issue:

Unable to exchange code for API access token. HTTP client error: Connection timed out after 60000 milliseconds
SDAdham commented 3 years ago

I double checked, I'll check again, what url does it call when it gives that timeout?

SDAdham commented 3 years ago

My configurations match:

{"custom_oidc": [{"name": "gitlab_oidc", "title": "Gitlab", "authorizeUrl": "https://gitlab.my-domain.org/oauth/authorize", "tokenUrl": "https://gitlab.my-domain.org/oauth/token", "userInfoUrl": "https://gitlab.my-domain.org/oauth/userinfo", "logoutUrl": "", "clientId": "$my_application_id", "clientSecret": "$my_super_secret_secret", "scope": "openid", "groupsClaim": "groups", "style": "gitlab", "defaultGroup": ""}]}
zorn-v commented 3 years ago

Check that server with nextcloud can reach https://gitlab.my-domain.org For example curl https://gitlab.my-domain.org in console

SDAdham commented 3 years ago

I tested it from the console, there is a network problem :) 👍 , thanks.