-
-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
parameter not being used in authorizationCodeGrant
#712
Comments
Can you expand this? |
@panva Sure thing. The error message for the obscured
And the
|
And is |
@panva We have to use a different My confusion is that when I copy all the search params from |
Ahhh, gotcha, I didn't see the positional This is expected behaviour then, the only means of passing the authorization response is with the
|
@panva The positional argument is being used here: const { searchParams } = new URL(callbackUrl);
await authorizationCodeGrant(
clientConfiguration,
currentUrl,
{
pkceCodeVerifier: codeVerifier,
idTokenExpected: true,
expectedState: this.#state,
},
searchParams, // Over here :)
);
Thanks for the clarification :) it is my mistake, I didn't know what |
Sure thing. I'll probably rename |
Thanks @panva for your help! Closing it as it has cleared my doubts. p/s: kudos on the refactoring to ESM, loving it! |
Thank you for the kind words. P.S. (jokingly) I would humbly accept and proudly display set 75276 in my office |
What happened?
We are refactoring our code that uses the API from v5 → v6, but ran into an issue with the
authorizationCodeGrant
function (which is the equivalent ofclient.callback
method in v5).When trying to pass the URL search params into the
parameter
positional argument, we get an "invalid response encountered" error from our issuer. When these parameters are provided as part of the URL then the error is resolved.Version
v6.1.1
Runtime
Node.js
Runtime Details
node@20.17.0
Code to reproduce
Legacy code using API from v5.7.0
This is the code that worked for us on v5:
Migrated code using API from v6.1.1
The error message I get (just by logging the entire `Error` object):
Required
The text was updated successfully, but these errors were encountered: