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

Incorrect OAuth token flow #53

Closed
katlyn opened this issue Jan 6, 2019 · 1 comment
Closed

Incorrect OAuth token flow #53

katlyn opened this issue Jan 6, 2019 · 1 comment

Comments

@katlyn
Copy link

katlyn commented Jan 6, 2019

It seems as if the token flow query parameters are incorrect in the authorize() function. Currently it looks like this:

const response = await this.fetch('POST', '/oauth2/token', {
  data: new URLSearchParams({
    client_id: this.clientId,
    code,
    grant_type: 'authorization_code',
    redirect_uri: redirectUri,
  }),
});

It seems to be missing the client_secret and scope, as is required for the OAuth token flow. I can open a PR if wanted.

@devsnek
Copy link
Member

devsnek commented Jan 11, 2019

client_secret isn't used on /oauth2/token, since you already have code at that point.

@devsnek devsnek closed this as completed Jan 11, 2019
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