I am trying to replace the old oidc-token-manager with oidc-client in my angular app, but I keep getting this error "No state in response", I have look at brockallen sample to learn how to use it, but not luck so far. Here is what I have in my service.
var config = {
client_id: "myClient"
, redirect_uri: "http://127.0.0.1:51899/callback.html"
, response_type: "id_token token"
, scope: "openid profile test"
, authority: "https://localhost:44369"
};
var mgr = new Oidc.UserManager(config);
and similar thing on my callback page.
This is what I have in my mainController
var tokenManager = {
mgr: {}
};
tokenManager.mgr = oidc.tokenManager();
startSigninMainWindow(tokenManager);
function startSigninMainWindow(tokenManager) {
tokenManager.mgr.signinRedirectCallback().then(function (user) {
var data = user.state.some;
}, function (err) {
console.log(err); // err:'No state in response'
});
}
Could any body tell me what I am doing wrong? Thanks. PS: BTW, I don't even get to see the login screen in the Identity Server any more