Function: validateCodeIdTokenResponse()

August 29, 2025 ยท View on GitHub

๐Ÿ’— Help the project

Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by becoming a sponsor.


โ–ธ validateCodeIdTokenResponse(as, client, parameters, expectedNonce, expectedState?, maxAge?, options?): Promise<URLSearchParams>

Same as validateAuthResponse but for code id_token authorization responses.

Parameters

ParameterTypeDescription
asAuthorizationServerAuthorization Server Metadata.
clientClientClient Metadata.
parametersURLSearchParams | Request | URLAuthorization Response parameters as URLSearchParams, instance of URL with parameters in a fragment/hash, or a form_post Request instance.
expectedNoncestringExpected ID Token nonce claim value.
expectedState?string | typeof expectNoStateExpected state parameter value. Default is expectNoState.
maxAge?number | typeof skipAuthTimeCheckID Token auth\_time claim value will be checked to be present and conform to the maxAge value. Use of this option is required if you sent a max_age parameter in an authorization request. Default is client.default\_max\_age and falls back to skipAuthTimeCheck.
options?ValidateSignatureOptions & JWEDecryptOptions-

Returns

Promise<URLSearchParams>

Validated Authorization Response parameters. Authorization Error Responses are rejected using AuthorizationResponseError.

See