BaseUrl isn't getting used
See original GitHub issueI’m getting the following error when calling the auth function:
ERROR Invoke Error { "errorType": "Error", "errorMessage": "connect ECONNREFUSED 127.0.0.1:8080", "trace": [ "Error: connect ECONNREFUSED 127.0.0.1:8080", " at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14)" ] }
It looks like it’s trying to hit the default baseUrl even though i passed in a new baseUrl. Code is below:
const KeycloakAdminClient = require('keycloak-admin').default;
const settings = {
baseUrl : config.KeycloakBaseLocation,
username : config.KeycloakUsername,
password : config.KeycloakPassword,
grant_type: 'password',
client_id : 'admin-cli',
realmName : config.KeycloakRealm
}
const client = new KeycloakAdminClient();
await client.auth(settings);
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
BaseURL not being used · Issue #1470 · axios/axios
I'm having a problem with the defaults property. When an instance is created I'm setting the baseUrl, checking the defaults value I can...
Read more >Axios baseURL is not appending with the URL in react.js
If you would like to understand what's happening, this is where axios builds the full path. It thinks you're passing an absolute URL...
Read more >Base URL not being used for thumbnails and other links
Ive installed jira software (server) on my centos machine. through nginx server i forward the requests to jira.
Read more >Request Config | Axios Docs
Requests will default to GET if method is not specified. ... is the request method to be used when making the request method:...
Read more >API Host and Base Path
REST APIs have a base URL to which the endpoint paths are appended. ... If schemes are not specified, the scheme used to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m getting the same error while using keycloak/keycloak-nodejs-connect, so your issue might be caused by something else
No. The REAME is correct, In your case maybe you were using the wrong “realm” and by not putting “realmName” in “KeycloakAdminClient” the library put you the realm “master”