Description
I had:
- Installed Rocket Chat using Ubuntu snap
- Using nginx reverse proxy from
subdomain.domain.com
to127.0.0.1:3000
- Configured Keycloak for SSO login using oAuth
Everything was working fine for months. Just today morning after server restart, whenever I try to login to Rocket Chat, it forward me to localhost:3000
I found that Rocket Chat siteurl
was set to localhost, so I changed to https://subdomain.domain.com
using:
sudo snap set rocketchat-server siteurl=https://subdomain.domain.com
However still the issue persist.
I can see similar message in Keycloak log whenever I try to login:
2022-09-18 13:37:02,708 WARN [org.keycloak.events] (executor-thread-134) type=CODE_TO_TOKEN_ERROR, realmId=anngo-hub, clientId=subdomain.domain.com, userId=36-CODE, ipAddress=127.0.0.1, error=invalid_code, grant_type=authorization_code, code_id=36-CODE, client_auth_method=client-secret
It seems that keycloak token given to Rocket Chat is wrong or missing but not sure how to check that if I can’t login to Rocket Chat. Is there a command line to get/set this value in Rocket Chat snap.