"No state in response" error with OIDC_CLIENT and angularJS

I am trying to replace the old oidc-token manager with oidc-client in my angular application, but I keep getting this "No status in response" error, I look at the brockallen sample to find out how to use it, but so far no luck. This is what I have in my ministry.

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 the like 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'
            });
        }

Can any body tell me what I am doing wrong? Thank you PS: BTW, I don’t even see the Identity Server login screen anymore

+4
source share

Source: https://habr.com/ru/post/1651970/


All Articles