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
The role merger implemented in f540e44 and referenced in #127 does not work.
With the configuration option roleMerge: RoleMerge.ALL and a class decorator @Roles({ roles: ['role1'] }) and a handler decorator @Roles({ roles: ['role2'] }) handler I get the following error at nest-keycloak-connect/guards/role.guard.js:79:36:
ERROR [ExceptionsHandler] Found non-callable @@iterator
TypeError: Found non-callable @@iterator
The nest function seem to be checking if it is an array. Does it have to do with the fact that we're passing an object instead ? It checks if a and b are objects and are merging them via object spread.
[Nest] 7605 - 02/06/2024, 1:05:30 PM ERROR [ExceptionsHandler] Spread syntax requires ...iterable[Symbol.iterator] to be a function
TypeError: Spread syntax requires ...iterable[Symbol.iterator] to be a function
at RoleGuard.<anonymous>
The role merger implemented in f540e44 and referenced in #127 does not work.
With the configuration option
roleMerge: RoleMerge.ALL
and a class decorator@Roles({ roles: ['role1'] })
and a handler decorator@Roles({ roles: ['role2'] })
handler I get the following error atnest-keycloak-connect/guards/role.guard.js:79:36
:nest-keycloak-connect/src/guards/role.guard.ts
Lines 48 to 54 in 69080fc
This is probably due to Nest not being able to merge the array in the
roles
property. Related Nest function:https://github.com/nestjs/nest/blob/a80df520bc0f5847eece8d1fd0d5a6f10b3ab6a6/packages/core/services/reflector.service.ts#L52-L76
Did I implement it wrong or is a custom merge method needed?
The text was updated successfully, but these errors were encountered: