dominik-th / matomo-plugin-LoginOIDC

external authentication services for matomo
https://plugins.matomo.org/LoginOIDC/
GNU General Public License v3.0
43 stars 31 forks source link

Unexpected response from OAuth service #63

Closed dm0610 closed 2 years ago

dm0610 commented 2 years ago

Hello! Could you help with debug error? I installed matomo+mysql in docker. Installed plugin loginoidc. We use keycloak as SSO. All of them have access to each other. Now we have error "Unexpected response from OAuth service" when we try to login. Here configs of keycloak and matomo:

---
Matomo:
matomo ip: 172.24.217.7
matomo dns: no
---
LoginOIDC:
Name: OAuth login
Authorize URL: https://sso.mydomen.ru/auth/realms/mytenant/protocol/openid-connect/auth
Token URL: https://sso.mydomen.ru/auth/realms/mytenant/protocol/openid-connect/token
Userinfo URL: https://sso.mydomen.ru/auth/realms/mytenant/protocol/openid-connect/userinfo
Logout URL: Empty
Userinfo ID: sub
ClientID: matomo
Secret: secret
OAuth scopes: openid email profile 
---
Client Protocol openid-connect
Access Type confidential
Root URL: Empty
Valid Redirect URIs: http://172.24.217.7/*
Base URL:http://172.24.217.7
Error in matomo container:
`192.168.225.175 - - [27/Jan/2022:17:37:04 +0300] "POST /index.php?module=LoginOIDC&action=signin HTTP/1.1" 302 692 "http://172.24.217.7/index.php" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36"
[Thu Jan 27 17:37:05.176649 2022] [php:notice] [pid 52] [client 192.168.225.175:47264] Error in Matomo: User not found. OAuth registrations are disabled.
192.168.225.175 - - [27/Jan/2022:17:37:04 +0300] "GET /index.php?module=LoginOIDC&action=callback&provider=oidc&state=cb0879d485a4ac91d2459b1adbe59bf8&session_state=6730d90f-0e97-4928-af76-aedbf03dacbe&code=07004b54-5a2f-47b2-949d-2a35ba626235.6730d90f-0e97-4928-af76-aedbf03dacbe.94d33470-81be-4d76-b0d8-32a97dae0b10 HTTP/1.1" 500 2192 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36"
`
Could you advice what to do?
I enabled DEBUG in matomo config, but it's logs not informative((
saschabrockel commented 6 months ago

How did you fix it? Do you remember it?