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

Oauth URL malformated #672

Closed
unicode-it opened this issue Dec 15, 2021 · 2 comments
Closed

Oauth URL malformated #672

unicode-it opened this issue Dec 15, 2021 · 2 comments

Comments

@unicode-it
Copy link

The URL cannot be parsed by the auth provider, because it contains a wrong '&' character at the beginning of the query params.

http://localhost:8000/o/authorize/?&client_id=client_id&redirect_uri=...

The bug is in function oauth2:

  for (key in data.params) {
    params += '&' + key + '=' + encodeURIComponent(data.params[key]);
  }

@unicode-it
Copy link
Author

Could maybe fix like this:

  let paramsArr = [];
  Object.keys(data.params).forEach((key) => {
    paramsArr.push(key + '=' + encodeURIComponent(data.params[key]));
  } );
  params = paramsArr.join('&');

@websanova
Copy link
Owner

alright, this is in 4.1.7, thx!.

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

2 participants