Closed Chandrama1 closed 3 years ago
Depending on the workflow it might not be the instance of the UserManager in the iframe that's processing the code and thus calling the token endpoint.
Depending on the workflow it might not be the instance of the UserManager in the iframe that's processing the code and thus calling the token endpoint.
I am not sure what you meant to say. Do you mean that there may be multiple instances of the User Manager created and that is causing the problem? The silent-callback.html is outside the Angular project and is loading a local copy of oidc-client.min.js. Please let me know if this is this the correct way of doing it. PFA the file for your reference. silent-callback.txt
The requirement is to pass the below object to signinSilentCallback() just like I am passing it to signinRedirect(). May I know if this is even possible?
extraTokenParams: { appId: <ID>, domain: <DOMAIN> }
signinSilentCallback does not contact the token endpoint. It passes the result back to the parent window where the parent windows completes the protocol exchange. So this means any data you pass into signinSilentCallback is moot. Instead pass the params into signinSilent. Does that not work for you?
Tried with signinSilent. It worked. Thanks
this.manager.events.addAccessTokenExpiring(() => { console.log('token expiring'); this.manager.signinSilent({ extraTokenParams: { appId: 123, domain: 'abc.com' } }).then(user => { }).catch(e => { }); });
This worked for me hence closing it.
I am using oidc-client library to provide authentication to an Angular 10 app. I am passing some extra params as shown below to the
signinRedirect
function. That is working as expected, but, when I am trying to do the same thing in the silent renew HTML file, the token endpoint doesn't get called. The identity provider is based on IdentityServer4.auth.service.ts
silent-callback.html