MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / idTokenIdentityLabel

Function idTokenIdentityLabel

packages/core/sdk/src/oauth-helpers.ts:591–600  ·  view source on GitHub ↗
(idToken: string | undefined)

Source from the content-addressed store, hash-verified

589};
590
591export const idTokenIdentityLabel = (idToken: string | undefined): string | undefined => {
592 if (!idToken) return undefined;
593 const claims = decodeJwtPayload(idToken);
594 if (!claims) return undefined;
595 return (
596 stringClaim(claims, "email") ??
597 stringClaim(claims, "preferred_username") ??
598 stringClaim(claims, "sub")
599 );
600};
601
602type StrippedTokenResponse = {
603 readonly response: Response;

Callers 2

stripIdTokenFunction · 0.85

Calls 2

decodeJwtPayloadFunction · 0.85
stringClaimFunction · 0.85

Tested by

no test coverage detected