diff --git a/src/userService.ts b/src/userService.ts index 539016e..8d3f1df 100644 --- a/src/userService.ts +++ b/src/userService.ts @@ -77,9 +77,10 @@ export function parseUserProfile( typeof jwtPayload['custom:phone_number_verified'] === 'boolean' ? jwtPayload['custom:phone_number_verified'] : undefined, - groups: Array.isArray(jwtPayload['custom:groups']) - ? jwtPayload['custom:groups'] - : undefined, + groups: + typeof jwtPayload['custom:groups'] === 'string' + ? jwtPayload['custom:groups'].split(',').map((group) => group.trim()) + : undefined, } if (