I’m setting up keycloak on my front with angularjs, and that’s currently setting it up.
service.keycloak = new Keycloak({
url: 'http://localhost:8200/auth',
realm: 'master',
clientId: 'bpms-dev'
});
service.keycloak.init({
onLoad: 'login-required',
enableLogging: true
}).then(function (auth){
if(auth){
var keycloak = service.keycloak;
$window.location.href = '/main.html';
}else{
console.log("authentication failed");
}
}).catch(function(error) {
console.log('failed to initialize');
});
And authentication is successful, but when I redirect to url main, any call to my backend has the problem below. How to solve this?
obs: My configuration of Web Origin and Valid Redirect Uri for my client (bpms-dev) is:
Web Origins: http://localhost:4200
Valid Redirect Uri: http://localhost:4200/*