Skip to content
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

authorizationUrl and passport strategy options incorrectly exploded into query params #167

Closed
przemos opened this issue May 15, 2019 · 1 comment

Comments

@przemos
Copy link

przemos commented May 15, 2019

Hi, just upgraded openid-client lib to 3.0.2.

I've noticed that when options object is passed to passport.authenticate, it is incorrectly attached to the authorizationUrl:
passport.authenticate('oidc', {
'scope': 'scopes'
'redirect_uri': 'someUrl`,
})(req, res, next);

then url is :
https://somehost/authorize?client_id=550bf762-dd80-437c-ac27-1b62d1d4d1bc&scope=somescope&response_type=code&state=60Lg2m9xstUv05fty2PozIS-SFvPQLXk83hqYkhCsAs&options=%5Bobject%20Object%5D

See options query params... it seems options parameters should be merged with defaults and flattened as name-value pairs, but it is attached as query params with tostring instead :(

@panva panva closed this as completed in 36e741e May 15, 2019
@panva
Copy link
Owner

panva commented May 15, 2019

@przemos thank you for the report, this was indeed a regression during the code syntax update and removal of unnecessary _.defaults. I've included a test for the fixed behaviour so that it does not re-appear in the future. This is now released as v3.1.1

@github-actions github-actions bot locked and limited conversation to collaborators Apr 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants