homebridge-melcloud-control 4.0.0-beta.379 → 4.0.0-beta.380

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "MELCloud Control",
3
3
  "name": "homebridge-melcloud-control",
4
- "version": "4.0.0-beta.379",
4
+ "version": "4.0.0-beta.380",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -44,8 +44,8 @@ class MelCloudHomeToken extends EventEmitter {
44
44
  try {
45
45
  const tokenData = new URLSearchParams({
46
46
  grant_type: 'authorization_code',
47
- code: code,
48
- redirect_uri: this.redirectUrl,
47
+ code: this.code,
48
+ redirect_uri: REDIRECT_URI,
49
49
  client_id: CLIENT_ID,
50
50
  code_verifier: codeVerifier,
51
51
  });
@@ -120,6 +120,7 @@ class MelCloudHomeToken extends EventEmitter {
120
120
  if (match) {
121
121
  const code = match[1];
122
122
  if (this.logWarn) this.emit('warn', `Redirect URL found code: ${code}`);
123
+ this.code = code
123
124
  return code;
124
125
  } else {
125
126
  if (this.logWarn) this.emit('warn', `Redirect URL found, but no "code=" param: ${redirectUrl}`);