angularopenid-connectangular-auth-oidc-client

How can I prevent destructive auto-authorization on application startup when using "angular-auth-oidc-client"?


My app uses "angular-auth-oidc-client" in mode "silent_run": true. My app starts with different routes and always with query parameters. Most of the resources in my application do not require authorization on the server. If I needed authorization, I ran it through this.oidcSecurityService.authorize(), but pre-save the current route and query parameters to restore it in the onAuthorizationResult event. On version 6.0.2, this worked, but from version 6.0.12 ("check for valid tokens on start up") and now on version 9.0.0, when the application starts, the authorization process that is not needed in most cases is automatically started, followed by a redirect to "post_login_route", respectively, with the loss of the route and the request parameters with which the application was launched.

How can I prevent destructive auto-authorization on application startup?


Solution

  • Version 9.0.1 added "history_cleanup_off" parameter which solves this problem, if you set it to "true".