okta-oidc-js
okta-oidc-js copied to clipboard
okta-angular: Implement CanLoad in OktaAuthGuard to be able to guard lazy loaded routes
Feature request
To block a lazy loaded route from being loaded in Angular, a guard can be used for the canLoad
route entry property:
{
path: 'admin-tools',
loadChildren: './admin-tools/admin-tools.module#AdminToolsModule',
canLoad: [MyCanLoadGuard],
}
This will stop the bundle from being loaded by the browser if the canLoad
returns false.
Can the OktaAuthGuard
get updated (or a new class created) to implement CanLoad
?
I too facing the same issue, i need to block the lazy loaded modules as canLoad is not available in OktaAuthGuard Should we have to override the method in OktaAuthGuard or should we need to create the class with canLoad ?
internal ref: OKTA-408692