Function: validateAuthResponse()

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.


โ–ธ validateAuthResponse(as, client, parameters, expectedState?): URLSearchParams

Validates an OAuth 2.0 Authorization Response or Authorization Error Response message returned from the authorization server's as.authorization\_endpoint.

Parameters

ParameterTypeDescription
asAuthorizationServerAuthorization Server Metadata.
clientClientClient Metadata.
parametersURLSearchParams | URLAuthorization response.
expectedState?string | typeof expectNoState | typeof skipStateCheckExpected state parameter value. Default is expectNoState.

Returns

URLSearchParams

Validated Authorization Response parameters. Authorization Error Responses throw AuthorizationResponseError.

See