We get the following error on an incoming request:
TypeError: Cannot read properties of undefined (reading 'getAllAndOverride')\n at AuthGuard.<anonymous> (/Users/jsanchez/project/node_modules/nest-keycloak-connect/dist/guards/auth.guard.js:71:50)
at Generator.next (<anonymous>)
at /Users/jsanchez/project/node_modules/nest-keycloak-connect/dist/guards/auth.guard.js:43:71
at new Promise (<anonymous>)
at __awaiter (/Users/jsanchez/project/node_modules/nest-keycloak-connect/dist/guards/auth.guard.js:39:12)
at AuthGuard.canActivate (/Users/jsanchez/project/node_modules/nest-keycloak-connect/dist/guards/auth.guard.js:69:16)
at GuardsConsumer.tryActivate (/Users/jsanchez/project/node_modules/@nestjs/core/guards/guards-consumer.js:15:34)
at canActivateFn (/Users/jsanchez/project/node_modules/@nestjs/core/router/router-execution-context.js:134:59)
at /Users/jsanchez/project/node_modules/@nestjs/core/router/router-execution-context.js:42:37
at /Users/jsanchez/project/node_modules/@nestjs/core/router/router-proxy.js:9:23"
We are simply loading the Keycloak config and declaring the guards in the providers:
We have a module and a service that configures the package:
We get the following error on an incoming request:
@nestjs/common@npm:9.3.9 [1b2ba] (via npm:^9.0.0 [1b2ba])