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

Checking for missing accessToken in getOAuthAccessToken breaks some oauth client integrations #148

Open
CaryLandholt opened this issue Oct 13, 2021 · 1 comment

Comments

@CaryLandholt
Copy link

With the introduction of a check for missing a accessToken in the getOAuthAccessToken function, some oauth clients break.

For instance, withings doesn't return an accessToken in the accessToken parameter, but returns it in the params parameter.

Here is a sample response from withings.

{
  err: null,
  accessToken: undefined,
  refreshToken: undefined,
  params: {
    status: 0,
    body: {
      userid: 'REDACTED',
      access_token: 'REDACTED',
      refresh_token: 'REDACTED',
      scope: 'REDACTED',
      expires_in: 10800,
      token_type: 'Bearer'
    }
  }
}
@MaleWeb
Copy link

MaleWeb commented Dec 17, 2021

old
self._loadUserProfile(accessToken, function(err, profile) {...}
new
self._loadUserProfile(params, function(err, profile) {...}

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