fix(jwt-parser): prevent [object Object] value
This commit is contained in:
		
							parent
							
								
									0ddf18f4b5
								
							
						
					
					
						commit
						a312dedf65
					
				| @ -20,7 +20,7 @@ function decodeJwt({ jwt }: { jwt: string }) { | |||||||
| 
 | 
 | ||||||
| function parseClaims({ claim, value }: { claim: string; value: unknown }) { | function parseClaims({ claim, value }: { claim: string; value: unknown }) { | ||||||
|   const claimDescription = CLAIM_DESCRIPTIONS[claim]; |   const claimDescription = CLAIM_DESCRIPTIONS[claim]; | ||||||
|   const formattedValue = _.toString(value); |   const formattedValue = _.isPlainObject(value) ? JSON.stringify(value, null, 3) : _.toString(value); | ||||||
|   const friendlyValue = getFriendlyValue({ claim, value }); |   const friendlyValue = getFriendlyValue({ claim, value }); | ||||||
| 
 | 
 | ||||||
|   return { |   return { | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user