Waziup / WaziCloud

WAZIUP Cloud and local platform
31 stars 28 forks source link

unauthorized_client #173

Closed henokzion closed 6 years ago

henokzion commented 6 years ago

Error is:

{
  "error": "unauthorized_client",
  "error_description": "UNKNOWN_CLIENT: Client was not identified by any client authenticator"
}
cdupont commented 6 years ago

This is an error with the client secret. You can see it in Keycloak realm Waziup: Clients/api-server/Credentials. The secret should be a number like: 4e9dcb80-efcd-484c-b3d7-1e95a0096ac0 If it's only stars **** it's not good. Keycloak config files should contain the code: https://github.com/Waziup/Platform/blob/master/keycloak/imports/waziup-realm.json#L555 The same code should be in the api-server config file: https://github.com/Waziup/api-server/blob/b85a6f947ee58e793e5783c28c1aa2817bd9ce7f/src/config.js#L11

If you have stars in the secret field, probably keycloak started with old configuration. Just delete all data in keycloak (you will lose all your configuration), and re-pull both keycloak and api-server just to be sure:

rm -rf ./data/keycloak/*
docker-compose pull keycloak api-server
docker-compose up

This should fix the issue. If it stays, there is a problem with the images.

cdupont commented 6 years ago

Closing for lack of activity