How to config OpenID in angular-oauth2-oidc so that some address doesn't need to authenticate

133 views Asked by At

I use the angular-oauth2-oidc project for OpenId in an Angular project. For some reason, I want to disable the authentication for some routes. I initialize the code flow in the main component and bootstrap it to the bootstrap section of the main module.

1

There are 1 answers

1
Iman Bahrampour On BEST ANSWER

If you are going to exclude some routes, it's better to change the bootstrapped component and initialize the code flow in the authorized component. create a main component and two other components for authorized and non-authorized URLs then bootstrap the main component in the main module and based on user routing load one of the created components.