Skip to content
This repository has been archived by the owner on Mar 3, 2022. It is now read-only.

Allow custom parameters to be set in silent renew #1356

Open
ShivaniDemra opened this issue Apr 29, 2021 · 0 comments
Open

Allow custom parameters to be set in silent renew #1356

ShivaniDemra opened this issue Apr 29, 2021 · 0 comments
Labels

Comments

@ShivaniDemra
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants