I think this is an error related to Angular 5.2.8 & 6. With Angular 5.2.7 everything worked fine.
I created a ng5 branch and updated Angular to latest, 5.2.8, and the error occurs!
Can anybody direct me to an Angular 5.2.8 (or later) sample with oidc-client-js
?
It is caused by URI encoding of state in the window.location.hash. For me this fix the issue:
if (window.location.hash) {
window.location.hash = decodeURIComponent(window.location.hash);
// authorizedCallback returns wrong result when hash is URI encoded
this.oidcSecurityService.authorizedCallback();
} else {
this.oidcSecurityService.authorize();
}