Silent Renew doesn't get invoked
See original GitHub issueI’ve tried to follow your example of setting up silent renew but I’m unable to get it to work. I’ve tried to read the documentation and code to find any events that gets triggered when silent renew is invoked.
Whats different in my source than your example is that I invoke authorization imediately when the user hit our app (as implemented in one of your examples).
When I set the silent_renew
to true I can see that there is created an iFrame in the DOM named myiFrameForSilentRenew
, but this iFrame is empty, from Developer Tools > Elements
I can see the structure of the iFrame:
<iframe id="myiFrameForSilentRenew" style="display: none;">
#document
<html>
<head></head>
<body></body>
</html>
</iframe>
The silent_renew.html
which I suspect would be encapsulated in this iFrame, is put on an address accessable from postman and Chrome, and the entire URI is set to the silent_renew_url
parameter.
The console doesn’t mention anything about silent_renew
getting invoked before the access_token
expires.
Sample app is attached.
Thanks. SilentRenew.zip
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (2 by maintainers)
Hey @damienbod , I was having a similar issue to @jonasbg because the iframe wasn’t actually pointing to the correct token renew url and server side we weren’t handling it correctly - IDS was giving back errors. @jonasbg you may want to check your Network tab in Chrome for request and look to see if its making a request for the silent-renew.html.
After fixing this issue im having a similar problem to @chazt3n. It appears that the iframe is reloading its src attribute every second which fires the ngOnInit() in my app.component. This component has some initial setup which calls lookup endpoints - so i’m seeing it making those requests over and over again.
I had set my silent_renew_offset_in_seconds setting to 300 - but the token expire time is 3600. Shouldn’t this mean it wont update the token for at least 3300 seconds? Why is it happening every second? Also - if I put that down to 10 seconds and it doesn’t seem to update every second anymore (however, I haven’t waited an hour to see if it does actually refresh though).
@damienbod any thoughts on this issue?
I got it to work, but I’m unsure of how. I think that I missed some silent-renew configs on the STS and setup.