You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
user redirects to a different secured page after authentication
five minutes pass
silent-refresh is invoked
this.router.navigate([path]); redirects to the default route, leaving the current page.
Debug findings:
onOidcModuleSetup() is only invoked during the initial auto-login use case.
local storage 'redirect' only contains the initial, default route
silent-refresh does not invoke onOidcModuleSetup() to re-write to the 'redirect' key.
onAuthorizationResultComplete() is invoked after silent-refresh completes
this.router.navigate([path]); redirects to the original stored route which is not the current route.
My fix:
since navigating to the current route is ultimately ignored by the angular router code, remove the local storage of 'redirect' and redirect to unauthorized only if the result is not AuthorizationResult.authorized.
console.log quick fix:
onOidcModuleSetup() has console.log('AppComponent:onModuleSetup'); included in the else block. Might help if moved outside of the if block.
The text was updated successfully, but these errors were encountered:
In the auto login / silent renew example of this repository: https://github.com/damienbod/dotnet-template-angular/blob/master/dotnet-angular-azure-ad-oidc/ClientApp/src/app/app.component.ts
Use case:
Debug findings:
My fix:
console.log quick fix:
onOidcModuleSetup() has console.log('AppComponent:onModuleSetup'); included in the else block. Might help if moved outside of the if block.
The text was updated successfully, but these errors were encountered: