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

OAuth2-Authorize-URL is not created correctly when "authorize_url" configuration contains URL parameters #74

Open
christian-judt opened this issue Nov 25, 2019 · 0 comments

Comments

@christian-judt
Copy link

"electron-oauth-helper": "5.0.0",

In the file:

/lib/oauth2/helper.ts

the code

const authorizeUrl = `${config.authorize_url}?${querystring.stringify(
  authorizeParameters,
)}`

does not create a correct OAuth2-Authorize-URL in case the URL stored in config.authorize_url already has URL parameters.

For example the config.authorize_url https://example/oauth2/auth?lang=en would be converted to the OAuth2-Authorize-URL https://example/oauth2/auth?lang=en?client_id=XXXXXX&redirect_uri=YYYYYY&... which has two question marks and thereby will most likely not work as intended in most OAuth2-Environments.

This problem seems to affect many if not all earlier versions of the OAuth-Helper as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant