fix(jwt-parser): prevent [object Object] value
This commit is contained in:
1 file changed
+1
-1
@@ -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 {
|
||||||
|
|||||||
Reference in new issue
Block a user