homebridge-melcloud-control 4.0.0-beta.404 → 4.0.0-beta.406

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.404",
4
+ "version": "4.0.0-beta.406",
5
5
  "description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
@@ -4,14 +4,11 @@ import { CookieJar } from 'tough-cookie';
4
4
  import { wrapper } from 'axios-cookiejar-support';
5
5
  import EventEmitter from 'events';
6
6
 
7
- const MOBILE_USER_AGENT =
8
- 'MonitorAndControl.App.Mobile/35 CFNetwork/3860.100.1 Darwin/25.0.0';
9
-
7
+ const MOBILE_USER_AGENT = 'MonitorAndControl.App.Mobile/35 CFNetwork/3860.100.1 Darwin/25.0.0';
10
8
  const CLIENT_ID = 'homemobile';
11
9
  const REDIRECT_URI = 'melcloudhome://';
12
10
  const SCOPE = 'openid profile email';
13
- const AUTH_BASE =
14
- 'https://live-melcloudhome.auth.eu-west-1.amazoncognito.com';
11
+ const AUTH_BASE = 'https://live-melcloudhome.auth.eu-west-1.amazoncognito.com';
15
12
  const TOKEN_URL = `${AUTH_BASE}/oauth2/token`;
16
13
  const AUTHORIZE_URL = `${AUTH_BASE}/login?`;
17
14
 
@@ -107,7 +104,7 @@ class MelCloudHomeToken extends EventEmitter {
107
104
  }
108
105
 
109
106
  // --- Main login flow ---
110
- async login(email, password) {
107
+ async getTokens(email, password) {
111
108
  const { verifier, challenge } = this._generatePkcePair();
112
109
 
113
110
  // Build authorize URL