I have a working app with automaticSilentRenew turned on. Everything works fine except that when the silent renew cycle completes, the current page is reloaded as well as all of the ngrx actions that had been fired since the page was first loaded. This poses a dangerous problem for me since some post'd actions are being silently triggered by this process.
I can post screenshots and some code snippets if needed.
Is this behavior intentional? If not, what do you suggest I can do to remedy this situation?
Thanks
Hey, take a look at this example https://github.com/FabianGosebrink/angular-oauth2-oidc-sample/tree/master/client/angular-oidc-oauth2-ngrx and https://offering.solutions/blog/articles/2020/05/29/authentication-in-angular-with-ngrx-and-asp.net-core/ blog here. There is a working ngrx example.
@FabianGosebrink Thank you for this repo and tutorial. I got it working but I'm not sure that the silentRenew is actually working.
I tried to configure my local IdSrv client with short token lifetimes to test it but I can't seem to get it to renew the token.
"AccessTokenLifetime": 120,
"IdentityTokenLifetime": 90,
If I reload the page after a signin and wait for the token expiration (about 2 mins), I am forced to clear the application cache and login again.
Thanks for your help
@FabianGosebrink It's working now. Turns out I didn't configure the silentRenewUrl and set up CSP according to the docs.
Thanks again for your help
Most helpful comment
@FabianGosebrink It's working now. Turns out I didn't configure the silentRenewUrl and set up CSP according to the docs.
Thanks again for your help