I am using following configuration in identityserver4 using oidc-client.js. It successfully does signin redirect. But "authUser" in following always comes null even after that. What's wrong am I doing. I followed their sample application.
const config = {
authority: "http://localhost:5000",
client_id: "js",
redirect_uri: "http://localhost:5003",
response_type: "id_token token",
scope: "openid profile api1",
post_logout_redirect_uri: "http://localhost:5003",
};
const mgr = new Oidc.UserManager(config);
mgr.getUser().then(function (authUser) {
if (authUser) {
//Home Page Coding will go here.
}
else {
mgr.signinRedirect();
}
});
Actually. I had not called following function. It was required.