Skip to content

Commit

Permalink
Merge pull request #84 from oneblink/ON-40845
Browse files Browse the repository at this point in the history
ON-40845 # Change `custom:groups` to comma seperated string
  • Loading branch information
RyanButton authored May 29, 2024
2 parents 4c097a4 + 55517b4 commit 7af0e39
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/userService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 7af0e39

Please sign in to comment.