Keycloak (19.0.1) is running in a server (with docker) external with a domain and tests are beeing realized from another network, i found the problem could be http://localhost:8080, but I have another system with Auth0 that works with http://localhost:8080.
Code:
let initOptions = {
url: 'https://keycloakaddr.example.com', realm: 'myrealm', clientId: 'myrealm', onLoad:'login-required'
}
Joining in http://localhost:8080, redirects to https://keycloakaddr.example.com but with the return:
Invalid parameter: redirect_uri
Some images: