code-specialist / fastapi-keycloak

Keycloak integration for Python FastAPI
https://fastapi-keycloak.code-specialist.com/
Apache License 2.0
192 stars 49 forks source link

unable to connect to keycloak server #70

Open abhijitgujar86 opened 2 years ago

abhijitgujar86 commented 2 years ago

keycloak version :: 19.0.0

requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8080): Max retries exceeded with url: /realms/RealmOne/.well-known/openid-configuration (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f94efdfe610>: Failed to establish a new connection: [Errno 111] Connection refused'))

( server_url="http://localhost:8080", client_id="myApp", client_secret="Y49wuMTCnLbX2bufuasJ73RSR9ivLWLu", admin_client_secret="admin-cli-secret", realm="RealmOne", callback_uri="http://localhost:8080/callback" ) I cannot find the admin secret anywhere in keycloak .

cissecedric commented 1 year ago

Hi @abhijitgujar86 did you find a solution, I face the exact same problem, thx!

CrinitusFeles commented 1 year ago

If you have the server configured by realm-esport.json file, you need to open the administrator's dashboard -> open 'Clients' tab -> choose admin-cli Client id -> there open tab Credentials and copy or generate new admin_client_secret