Skip to content

Commit c79ccc5

Browse files
committed
refactor: rename the parameters positional argument in authorizationCodeGrant()
refs: #712
1 parent f110a2d commit c79ccc5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2498,8 +2498,8 @@ function webInstanceOf<T>(input: unknown, toStringTag: string): input is T {
24982498
* {@link !"Authorization Code Grant"} parameters are extracted from this.
24992499
* @param checks CSRF Protection checks like PKCE, expected state, or expected
25002500
* nonce
2501-
* @param parameters Additional parameters that will be sent to the token
2502-
* endpoint, typically used for parameters such as `resource`
2501+
* @param tokenEndpointParameters Additional parameters that will be sent to the
2502+
* token endpoint, typically used for parameters such as `resource`
25032503
* ({@link !"Resource Indicators" Resource Indicator}) in cases where multiple
25042504
* resource indicators were requested but the authorization server only
25052505
* supports issuing an access token with a single audience
@@ -2513,7 +2513,7 @@ export async function authorizationCodeGrant(
25132513
config: Configuration,
25142514
currentUrl: URL | Request,
25152515
checks?: AuthorizationCodeGrantChecks,
2516-
parameters?: URLSearchParams | Record<string, string>,
2516+
tokenEndpointParameters?: URLSearchParams | Record<string, string>,
25172517
options?: AuthorizationCodeGrantOptions,
25182518
): Promise<oauth.TokenEndpointResponse & TokenEndpointResponseHelpers> {
25192519
checkConfig(config)
@@ -2590,7 +2590,7 @@ export async function authorizationCodeGrant(
25902590
// @ts-expect-error
25912591
checks?.pkceCodeVerifier || oauth._nopkce,
25922592
{
2593-
additionalParameters: parameters,
2593+
additionalParameters: tokenEndpointParameters,
25942594
[oauth.customFetch]: fetch,
25952595
[oauth.allowInsecureRequests]: !tlsOnly,
25962596
DPoP: options?.DPoP,
@@ -2624,7 +2624,7 @@ export async function authorizationCodeGrant(
26242624
// @ts-expect-error
26252625
undefined,
26262626
checks,
2627-
parameters,
2627+
tokenEndpointParameters,
26282628
{
26292629
...options,
26302630
flag: retry,

0 commit comments

Comments
 (0)