Skip to content

parseUserinfoResponse

parseUserinfoResponse(data): OidcUser

Defined in: packages/core/src/userinfo.ts:36

Parses and validates a UserInfo response, ensuring the required sub claim is present.

unknown

The parsed JSON body returned from the UserInfo endpoint.

OidcUser

The validated OidcUser object.

OidcError with code TOKEN_EXCHANGE_ERROR if the response is not an object or sub is missing.

OpenID Connect Core 1.0 §5.3.2 — UserInfo Response