n8n-nodes-jygse-vw-weconnect 0.2.4 → 0.2.5
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.
|
@@ -216,18 +216,17 @@ async function vwLogin(context, email, password) {
|
|
|
216
216
|
const state = generateTraceId(); // Use UUID as state
|
|
217
217
|
const traceId = generateTraceId(); // For weconnect-trace-id header
|
|
218
218
|
const codeVerifier = generateCodeVerifier();
|
|
219
|
-
// Browser-like headers (from ioBroker.vw-connect
|
|
219
|
+
// Browser-like headers (EXACTLY from ioBroker.vw-connect)
|
|
220
220
|
const browserHeaders = {
|
|
221
221
|
'User-Agent': VW_USER_AGENT,
|
|
222
|
-
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/
|
|
222
|
+
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3',
|
|
223
223
|
'Accept-Language': VW_ACCEPT_LANGUAGE,
|
|
224
|
-
'Accept-Encoding': 'gzip, deflate
|
|
224
|
+
'Accept-Encoding': 'gzip, deflate',
|
|
225
225
|
'x-requested-with': VW_APP_PACKAGE,
|
|
226
226
|
'upgrade-insecure-requests': '1',
|
|
227
227
|
};
|
|
228
|
-
// Generate PKCE code challenge (required by VW identity)
|
|
229
|
-
const codeChallenge = generateCodeChallenge(codeVerifier);
|
|
230
228
|
// Step 1: Go directly to identity.vwgroup.io (like ioBroker adapter)
|
|
229
|
+
// Note: VW ID type does NOT use PKCE (code_challenge) - only VW v2 does
|
|
231
230
|
const authorizeUrl = 'https://identity.vwgroup.io/oidc/v1/authorize';
|
|
232
231
|
const authorizeParams = new URLSearchParams({
|
|
233
232
|
client_id: VW_CLIENT_ID,
|
|
@@ -236,8 +235,6 @@ async function vwLogin(context, email, password) {
|
|
|
236
235
|
redirect_uri: VW_REDIRECT_URI,
|
|
237
236
|
nonce: nonce,
|
|
238
237
|
state: state,
|
|
239
|
-
code_challenge: codeChallenge,
|
|
240
|
-
code_challenge_method: 'S256',
|
|
241
238
|
});
|
|
242
239
|
// Use browser-like headers for initial request
|
|
243
240
|
// Let n8n follow redirects automatically to reach the login page
|
package/package.json
CHANGED