@orangecheck/auth-core / resolveDisplayIdentity
Function: resolveDisplayIdentity()
function resolveDisplayIdentity(payload: SessionPayload): DisplayIdentity;
Defined in: index.ts:240
Resolve the account-badge identity for a session — total, never
throws, always returns a renderable { kind, value }.
Returns the JWT's display_identity claim when it is present and
well-formed; otherwise falls back to the canonical did:oc. Use
this everywhere you render the badge label rather than reading the
raw claim, so tokens minted before the field shipped (and tokens
carrying a malformed claim) degrade gracefully to the did.
This is the single resolver both <OcAccountMenu> and integrators
building their own chip should call.
Parameters
| Parameter | Type |
|---|---|
payload | SessionPayload |