Allow custom parameters to be set in silent renew #1356
Description
I have implemented silent renew in my react app. I am sending extraTokenParams (appId and domain) when authorizing using IdentityServer4. I need to pass the same custom parameters when the token is being refreshed. Could not find a way to do it.
Code snippet for authorize endpoint:
mgr.signinRedirectCallback(window.location.href).then(function () {
window.location = "/";
}).catch(function (e) {
mgr.signinRedirect({
extraTokenParams: {
appId: 1111,
domain:"xyz.com"
}}
);
});
For silent renew I am using below:
const stsSettings = {
authority: "XXXX",
client_id: "XXXX",
response_type: "code",
scope: "openid profile"
};
new Oidc.UserManager(stsSettings).signinSilentCallback().then(response => {
console.log(response);
}).catch(error => {
console.error(error);
});
Adding extra params to stsSettings did not work.